Метод |
Описание |
|
__construct ( Silex\Application $app ) |
|
|
addRole ( string | integer $id, string $role ) : boolean |
Add a certain role from a specific user. |
|
checkAntiCSRFToken ( $token = '' ) |
|
|
checkAvailability ( string $fieldname, string $value, integer $currentid ) : boolean |
Check if a certain field with a certain value doesn't exist already. |
|
checkForRoot ( ) : boolean |
Check for a user with the 'root' role. |
|
checkValidSession ( ) |
|
|
deleteUser ( integer $id ) : integer |
Remove a user from the database. |
|
filterManipulatableRoles ( string | integer $id, array $newRoles ) : string[] |
Ensure changes to the user's roles match what the current user has
permissions to manipulate. |
|
getActiveSessions ( ) |
|
|
getAntiCSRFToken ( ) |
|
|
getCurrentUser ( ) : array |
Get the current user as an array. |
|
getCurrentUserProperty ( string $property ) : string |
Get the current user's property. |
|
getCurrentUsername ( ) : string |
Get the username of the current user. |
|
getEmptyUser ( ) : array |
Create a stub for a new/empty user. |
|
getUser ( integer | string $userId ) : array | false |
Get a user, specified by ID, username or email address. |
|
getUsers ( ) : array[] |
Get an array with the current users. |
|
hasRole ( string | integer $id, string $role ) : boolean |
Check if a certain user has a specific role. |
|
hasUsers ( ) : integer |
Test to see if there are users in the user table. |
|
isAllowed ( string $what, string $contenttype = null, integer $contentid = null ) : boolean |
Runs a permission check. Permissions are encoded as strings, where
the ':' character acts as a separator for dynamic parts and
sub-permissions. |
|
isContentStatusTransitionAllowed ( string $fromStatus, string $toStatus, string $contenttype, string $contentid = null ) : boolean |
Check to see if the current user can change the status on the record. |
|
isEnabled ( integer | boolean $id = false ) : boolean |
Check a user's enable status. |
|
isValidSession ( ) |
|
|
removeRole ( string | integer $id, string $role ) : boolean |
Remove a certain role from a specific user. |
|
saveUser ( Bolt\Storage\Entity\Users | array $user ) : integer |
Save changes to a user to the database. (re)hashing the password, if needed. |
|
setEnabled ( integer | string $id, boolean | integer $enabled = true ) : integer |
Enable or disable a user, specified by id. |
|
updateUserLogin ( $user ) |
|
|