PHP Class Backend\Core\Engine\User

Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
__construct ( integer $userId = null, string $email = null )
getEmail ( ) : string Get email
getGroupId ( ) : null Get groupid
getGroups ( ) : array
getLastloggedInDate ( ) : integer Get last logged in date
getSecretKey ( ) : string Get secretkey
getSessionId ( ) : string Get sessionId
getSetting ( string $key, mixed $defaultValue = null ) : mixed Get a setting
getSettings ( ) : array Get all settings at once
getUserId ( ) : integer Get userid
isAuthenticated ( ) : boolean Is the current userobject a authenticated user?
isGod ( ) : boolean Is the current user a God?
loadUser ( integer $userId ) Load a user
loadUserByEmail ( string $email ) Load a user by his e-mail adress
setSetting ( string $key, mixed $value ) Set a setting

Private Methods

Method Description
loadGroups ( integer $userId )
setEmail ( string $value ) Set email
setLastloggedInDate ( integer $value ) Set last logged in date
setSecretKey ( string $value ) Set secretkey
setSessionId ( string $value ) Set sessionid
setUserId ( integer $value ) Set userid

Method Details

__construct() public method

public __construct ( integer $userId = null, string $email = null )
$userId integer The id of the user.
$email string The e-mail address of the user.

getEmail() public method

Get email
public getEmail ( ) : string
return string

getGroupId() public method

Get groupid
Deprecation:
public getGroupId ( ) : null
return null

getGroups() public method

public getGroups ( ) : array
return array

getLastloggedInDate() public method

Get last logged in date
public getLastloggedInDate ( ) : integer
return integer

getSecretKey() public method

Get secretkey
public getSecretKey ( ) : string
return string

getSessionId() public method

Get sessionId
public getSessionId ( ) : string
return string

getSetting() public method

Get a setting
public getSetting ( string $key, mixed $defaultValue = null ) : mixed
$key string The key for the setting to get.
$defaultValue mixed Default value, will be stored if the setting isn't set.
return mixed

getSettings() public method

Get all settings at once
public getSettings ( ) : array
return array

getUserId() public method

Get userid
public getUserId ( ) : integer
return integer

isAuthenticated() public method

Is the current userobject a authenticated user?
public isAuthenticated ( ) : boolean
return boolean

isGod() public method

Is the current user a God?
public isGod ( ) : boolean
return boolean

loadUser() public method

Load a user
public loadUser ( integer $userId )
$userId integer The id of the user to load.

loadUserByEmail() public method

Load a user by his e-mail adress
public loadUserByEmail ( string $email )
$email string The email of the user to load.

setSetting() public method

Set a setting
public setSetting ( string $key, mixed $value )
$key string The key of the setting.
$value mixed The value to store.