e107sk.com

Content Category User management

User management (3 items)

Sunday 18 August 2019

Stuff related to users, user groups and roles

User Data on 26 Apr 2020

How to get user Data

Example from old plugin

$sql5 = new db;
  $sql5->mySQLresult = @mysql_query("select * from ".MPREFIX."user where user_id='".intval($row4['news_com_author'])."';");
  $row5 = $sql5->db_fetch();
  $newscomauthor = $row5['user_name'];

Now:

$row5 = e107::user(intval($row4['news_com_author']));
  $newscomauthor = $row5['user_name'];
Official documentation:
e107::user($user_id);
$userData = e107::user(); // Example - currently logged in user. 
$userData = e107::user(5); // Example  User ID #5.

function getperms() - listing available admin permissions on 30 Jul 2018

to understand how to set permissions in administra[...]

list was made mainly for creating custom plugin
1 - Access to Preferences
2 - Access to Menu Manager
3 - Access to Administrators
4 - Manage all User, Userclass and Extended User-Field settings
U0 - Access to Banlist
U1 - Quick Add User)
U2 - User Options
U3 - >User Ranks
5 - Pages/Menus
6 - Access to Media Manager
A  - Access to Media Manager (All)
A1 - Access to Media Manager (Upload/Import)
A2 - Media Manager (Categories)
8 - Access Oversee link categories
9 - Access to Maintenance
B - Access to Comments Manager
C - Access to Cache
F - Access to Emoticons
G - Access to Front Page
H - Access to News
H0 - News (Create)
H1 - News (Edit)
H2 - News (Delete)
H3 - News (Category - Create)
H4 - News (Category - Edit)
H5 - News (Category - Delete
I - Site Links
J - Pages/Menus
K - Access URL Configuration
L - Access to Language
M - Access to Welcome Message
N - News (Submitted)
O - Access to Notify
P - Access to Plugin Administration
S - Access to System Logs
T - Access to Meta Tags
U - Access to Schedule Tasks
V - Access to Manage/upload files
W - Access to Mail
X - Access to Search
Y - Access to Plugin Manager
Z - Access to File Inspector

User classes constants on 30 Nov 1999

Userclass names versus numbers saved in database

What e_UC_PUBLIC and similar constants mean and what value is saved in database
e_UC_PUBLIC0
e_UC_MAINADMIN250
e_UC_READONLY251
e_UC_GUEST252
e_UC_MEMBER253
e_UC_ADMIN254
e_UC_NOBODY255
e_UC_ADMINMOD 249 Admins (includes main admins)
e_UC_MODS248 Moderators (who aren't admins)
e_UC_NEWUSER 247Users in 'probationary' period
e_UC_BOTS246Reserved to identify search bots
e_UC_SPECIAL_BASE243Assign class IDs 243 and above for fixed/special purposes
e_UC_SPECIAL_END255Highest 'special' class
// 243..245 reserved for future predefined user classes

Other links

Follow us