PHP Класс Backend\Core\Engine\User

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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() публичный Метод

Get email
public getEmail ( ) : string
Результат string

getGroupId() публичный Метод

Get groupid
Устаревший:
public getGroupId ( ) : null
Результат null

getGroups() публичный Метод

public getGroups ( ) : array
Результат array

getLastloggedInDate() публичный Метод

Get last logged in date
public getLastloggedInDate ( ) : integer
Результат integer

getSecretKey() публичный Метод

Get secretkey
public getSecretKey ( ) : string
Результат string

getSessionId() публичный Метод

Get sessionId
public getSessionId ( ) : string
Результат string

getSetting() публичный Метод

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.
Результат mixed

getSettings() публичный Метод

Get all settings at once
public getSettings ( ) : array
Результат array

getUserId() публичный Метод

Get userid
public getUserId ( ) : integer
Результат integer

isAuthenticated() публичный Метод

Is the current userobject a authenticated user?
public isAuthenticated ( ) : boolean
Результат boolean

isGod() публичный Метод

Is the current user a God?
public isGod ( ) : boolean
Результат boolean

loadUser() публичный Метод

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

loadUserByEmail() публичный Метод

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

setSetting() публичный Метод

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