PHP Класс Backend\Modules\Users\Engine\Model

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

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

Метод Описание
delete ( integer $id ) Mark the user as deleted and deactivate his account.
deleteResetPasswordSettings ( integer $id ) Deletes the reset_password_key and reset_password_timestamp for a given user ID
emailDeletedBefore ( string $email ) : boolean Was a user deleted before?
exists ( integer $id, boolean $active = true ) : boolean Does the user exist.
existsEmail ( string $email, integer $id = null ) : boolean Does a email already exist? If you specify a userId, the email with the given id will be ignored.
get ( integer $id ) : array Get all data for a given user
getCSVLineEndings ( ) : array Get the possible line endings for a CSV-file
getCSVSplitCharacters ( ) : array Get the possible CSV split characters
getDateFormats ( ) : array Fetch the list of date formats including examples of these formats.
getGroups ( ) : array Get user groups
getIdByEmail ( string $email ) : integer Get the user ID linked to a given email
getModuleGroupsRightsActions ( integer $userId ) : array Get all module action combinations a user has access to
getNumberFormats ( ) : array Fetch the list of number formats including examples of these formats.
getSetting ( integer $userId, string $setting ) : mixed Fetch a user setting for a specific user
getTimeFormats ( ) : array Fetch the list of time formats including examples of these formats.
getUsers ( ) : array Get all users
insert ( array $user, array $settings ) : integer Add a new user.
setSetting ( integer $userId, string $setting, string $value ) : mixed Set a user setting for a specific user
undoDelete ( string $email ) : boolean Restores a user
update ( array $user, array $settings ) Save the changes for a given user Remark: $user['id'] should be available
updatePassword ( User $user, string $password ) Update the user password

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

delete() публичный статический Метод

Mark the user as deleted and deactivate his account.
public static delete ( integer $id )
$id integer The userId to delete.

deleteResetPasswordSettings() публичный статический Метод

Deletes the reset_password_key and reset_password_timestamp for a given user ID
public static deleteResetPasswordSettings ( integer $id )
$id integer The userId wherefore the reset-stuff should be deleted.

emailDeletedBefore() публичный статический Метод

Was a user deleted before?
public static emailDeletedBefore ( string $email ) : boolean
$email string The e-mail address to check.
Результат boolean

exists() публичный статический Метод

Does the user exist.
public static exists ( integer $id, boolean $active = true ) : boolean
$id integer The userId to check for existence.
$active boolean Should the user be active also?
Результат boolean

existsEmail() публичный статический Метод

Does a email already exist? If you specify a userId, the email with the given id will be ignored.
public static existsEmail ( string $email, integer $id = null ) : boolean
$email string The email to check for.
$id integer The userId to be ignored.
Результат boolean

get() публичный статический Метод

Get all data for a given user
public static get ( integer $id ) : array
$id integer The userId to get the data for.
Результат array

getCSVLineEndings() публичный статический Метод

Get the possible line endings for a CSV-file
public static getCSVLineEndings ( ) : array
Результат array

getCSVSplitCharacters() публичный статический Метод

Get the possible CSV split characters
public static getCSVSplitCharacters ( ) : array
Результат array

getDateFormats() публичный статический Метод

Fetch the list of date formats including examples of these formats.
public static getDateFormats ( ) : array
Результат array

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

Get user groups
public static getGroups ( ) : array
Результат array

getIdByEmail() публичный статический Метод

Get the user ID linked to a given email
public static getIdByEmail ( string $email ) : integer
$email string The email for the user.
Результат integer

getModuleGroupsRightsActions() публичный статический Метод

Get all module action combinations a user has access to
public static getModuleGroupsRightsActions ( integer $userId ) : array
$userId integer The id of the user
Результат array

getNumberFormats() публичный статический Метод

Fetch the list of number formats including examples of these formats.
public static getNumberFormats ( ) : array
Результат array

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

Fetch a user setting for a specific user
public static getSetting ( integer $userId, string $setting ) : mixed
$userId integer The id of the user.
$setting string The name of the setting to get.
Результат mixed

getTimeFormats() публичный статический Метод

Fetch the list of time formats including examples of these formats.
public static getTimeFormats ( ) : array
Результат array

getUsers() публичный статический Метод

Get all users
public static getUsers ( ) : array
Результат array

insert() публичный статический Метод

Add a new user.
public static insert ( array $user, array $settings ) : integer
$user array The userdata.
$settings array The settings for the new user.
Результат integer

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

Set a user setting for a specific user
public static setSetting ( integer $userId, string $setting, string $value ) : mixed
$userId integer The id of the user.
$setting string The name of the setting to set.
$value string The value of the setting to set.
Результат mixed

undoDelete() публичный статический Метод

Restores a user
public static undoDelete ( string $email ) : boolean
$email string The e-mail address of the user to restore.
Результат boolean

update() публичный статический Метод

Save the changes for a given user Remark: $user['id'] should be available
public static update ( array $user, array $settings )
$user array The userdata.
$settings array The settings for the user.

updatePassword() публичный статический Метод

Update the user password
public static updatePassword ( User $user, string $password )
$user Backend\Core\Engine\User An instance of BackendUser.
$password string The new password for the user.