All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields | Static Protected Member Functions
UserStatusUtil Class Reference

Static Public Member Functions

static makeByUser (User $user)
 
static getSelectedValueByUser (User $user)
 
static makeByPostData ($postData)
 
static removeIfExistsFromPostData ($postData)
 
static resolveUserStatus (User $user, UserStatus $userStatus)
 
static getStatusArray ()
 
static canUserEditStatusOnAnotherUser (User $user, User $anotherUser)
 

Data Fields

const ACTIVE = 'Active'
 
const INACTIVE = 'Inactive'
 

Static Protected Member Functions

static removeExplicitDenyRights (User $user)
 
static setExplicitDenyRights (User $user)
 

Detailed Description

Helper class for managing the explicit setting of login rights against a user in the user interface.

See Also
UserStatus
DerivedUserStatusElement

Definition at line 42 of file UserStatusUtil.php.

Member Function Documentation

static makeByUser ( User  $user)
static

Given a User, make the UserStatus based on explict login rights on that user

Parameters
User$user

Definition at line 52 of file UserStatusUtil.php.

static getSelectedValueByUser ( User  $user)
static
Parameters
User$user
Returns
string

Definition at line 68 of file UserStatusUtil.php.

static makeByPostData (   $postData)
static
Parameters
array$postData

Definition at line 84 of file UserStatusUtil.php.

static removeIfExistsFromPostData (   $postData)
static

Unset the 'userStatus' element in a post data array if it exists.

Parameters
array$postData
Returns
array of post data with the 'userStatus' removed.

Definition at line 112 of file UserStatusUtil.php.

static resolveUserStatus ( User  $user,
UserStatus  $userStatus 
)
static

Given a User and a UserStatus resolve the removal or addition of explicit deny rights for login.

Parameters
User$user
UserStatus$userStatus

Definition at line 127 of file UserStatusUtil.php.

static canUserEditStatusOnAnotherUser ( User  $user,
User  $anotherUser 
)
static

Given two users, can the first $user edit the status on the $anotherUser. This is important to check to keep user's from deactivating themselves and deactivating administrators.

Parameters
User$user
User$anotherUser
Returns
true/false

Definition at line 189 of file UserStatusUtil.php.


The documentation for this class was generated from the following file:
Generated on Fri Jan 24 2020 07:10:46