PHP Class Frontend\Core\Engine\User

Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
__construct ( integer $userId = null )
getBackendUser ( integer $userId ) : User Get a backend user
getEmail ( ) : string Get email
getSetting ( string $key ) : mixed Get a setting
getSettings ( ) : array Get all settings at once
getUserId ( ) : integer Get user id
loadUser ( integer $userId ) Load the data for the given user

Private Methods

Method Description
setEmail ( string $value ) Set email
setUserId ( integer $value ) Set user id

Method Details

__construct() public method

public __construct ( integer $userId = null )
$userId integer If you provide a userId, the object will be loaded with the data for this user.

getBackendUser() public static method

Get a backend user
public static getBackendUser ( integer $userId ) : User
$userId integer The users id in the backend.
return User

getEmail() public method

Get email
public getEmail ( ) : string
return string

getSetting() public method

Get a setting
public getSetting ( string $key ) : mixed
$key string The name of the setting.
return mixed The stored value, if the setting wasn't found null will be returned

getSettings() public method

Get all settings at once
public getSettings ( ) : array
return array An key-value-array with all settings for this user.

getUserId() public method

Get user id
public getUserId ( ) : integer
return integer

loadUser() public method

Load the data for the given user
public loadUser ( integer $userId )
$userId integer The users id in the backend.