Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

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:
 All Data Structures Functions Variables
Generated on Mon Jan 21 07:10:29 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8