|
|
| $uid = null |
| | Authorized user_id.
|
| |
|
| $real_uid = null |
| | UID for the real user during switch-user.
|
| |
|
| $m_user = null |
| | Pointer to user model (being deprecated, use user instead)
|
| |
|
| $user = null |
| | Logged in user (object)
|
| |
| Authuser::__construct |
( |
| ) |
|
| Authuser::get_permissions |
( |
|
$uid = null | ) |
|
Get a list of permissions for the currently logged-in user, including both individual permissions and those associated with a role.
- Parameters
-
| Authuser::get_roles |
( |
|
$uid = null | ) |
|
Get a list of role_ids for the currently logged-in user.
- Parameters
-
| Authuser::has_permission |
( |
|
$perms = null, |
|
|
|
$uid = null, |
|
|
|
$quiet = false |
|
) |
| |
Test if the user has the given permission(s).
- Parameters
-
| mixed | $perms | |
| int | $uid | - optional uid |
| bool | $quiet | - don't report invalid perms |
| Authuser::has_role |
( |
|
$role_ids, |
|
|
|
$uid = null |
|
) |
| |
Test if the user has the given role(s).
- Parameters
-
| int | array | $role_ids | |
| int | $uid | - optional uid |
Initialization function. This function should be called by a post_controller_constructor hook. It will set up the auth user data and perform autologin.
| Authuser::is_logged_in |
( |
|
$uid = null | ) |
|
Test if the user is logged in.
| Authuser::is_valid_user |
( |
|
$uid = null | ) |
|
Test if a user is valid. If no uid is specified, then it will test the current user. The user_model defines the valid state.
- Parameters
-
| Authuser::login |
( |
|
$username, |
|
|
|
$password, |
|
|
|
$auto_login = false |
|
) |
| |
Process the login form POST.
- Parameters
-
| str | $username | |
| str | $password | |
| bool | $auto_login | |
| Authuser::switch_user |
( |
|
$user_id | ) |
|
Change to a different user. NOTE: It is expected that the controllers handle all the security details!
- Parameters
-
The documentation for this class was generated from the following file:
- qvci/libraries/Authuser.php