PHP Class Frontend\Core\Engine\User

Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
setEmail ( string $value ) Set email
setUserId ( integer $value ) Set user id

Method Details

__construct() public méthode

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 méthode

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

getEmail() public méthode

Get email
public getEmail ( ) : string
Résultat string

getSetting() public méthode

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

getSettings() public méthode

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

getUserId() public méthode

Get user id
public getUserId ( ) : integer
Résultat integer

loadUser() public méthode

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