USER
Common methods for handling users.
version | 1 |
---|---|
package | wikindx4\core\usergroups |
author | Mark Grimshaw |
__construct()
checkPassword(string $username, string $pwdInput) : boolean
Return FALSE for password not found or password doesn't match. Superadmin is always id = 1
string
string
boolean
deleteSql(array $input) : boolean
array
Array of ids in WKX_users.
boolean
displayUserAddEdit(array $row, boolean $both, string $type) : array
.., edited by... details for displaying resources
array
boolean
Default is FALSE
string
Default is 'resource'
array
($userAdd, $userEdit)displayUserAddEditPlain(int $addId) : string
Plain version of displayUserAddEdit() used in core/modules/email/EMAIL.php for notify emails
int
string
displayUserDetails(string $form, string $hidden, int $admin) : string
If $admin != FALSE, it is the user id that an admin is editing
string
string
int
Default is FALSE
string
environment(array $row, string $username)
array
string
Default is FALSE
grabAll(boolean $full, boolean $useBib, string $addEdit) : mixed
Return associative array of id => group of FALSE if no users.
boolean
Default is FALSE
boolean
Default is FALSE
string
Default is 'add'
mixed
FALSE|arraylistUserGroups() : mixed
mixed
FALSE|arrayloadSession(int $id)
int
Default is FALSE
writePreferences(\id $userId)
\id
writeSessionPreferences(int $userId, string $table, boolean $upgrade) : boolean
Can come from users or config (default values for readOnly user in which case $userId = FALSE)
int
string
boolean
Default is FALSE
boolean
writeUser(boolean $add, int $admin) : mixed
If $admin = 0, this is a standard user. If $admin = 1, this is the initial configuration/reconfiguration and we need to insert superadmin details into the database. If $admin = 2, this is an admin editing or adding a user. a) the user may not change the username from this screen. When adding a user, we need to check there is not already $username (caseless) in the database. NB - returns FALSE in case of success, an error message in case of failure.
boolean
Default is TRUE
int
Default is 0
mixed
$db
$errors
$form
$html
$loadstyle
$session
$table
$template
$vars