PHP Class skeeks\cms\models\User

Inheritance: extends Core, implements yii\web\IdentityInterface, use trait skeeks\cms\models\behaviors\traits\HasRelatedPropertiesTrait
Show file Open project: skeeks-cms/cms Class Usage Examples

Protected Properties

Property Type Description
$_roleNames

Public Methods

Method Description
_cmsAfterSave ( $e )
attributeLabels ( )
behaviors ( )
checkDataBeforeDelete ( $e )
extraFields ( )
findByEmail ( $email ) : static Finds user by email
findByPasswordResetToken ( string $token ) : static | null Finds user by password reset token
findByPhone ( $phone ) : null | CmsUser
findByUsername ( string $username ) : static Finds user by username
findByUsernameOrEmail ( $value ) : User Поиск пользователя по email или логину
findIdentity ( $id )
findIdentityByAccessToken ( $token, $type = null )
generateAuthKey ( ) Generates "remember me" authentication key
generatePasswordResetToken ( ) Generates new password reset token
generateUsername ( ) Генерация логина пользователя
getAuthKey ( )
getAvatarSrc ( integer $width = 50, integer $height = 50, $mode = ManipulatorInterface::THUMBNAIL_OUTBOUND ) : mixed | null | string
getCmsContentElement2cmsUsers ( ) : ActiveQuery
getCmsUserAuthClients ( ) : ActiveQuery
getCmsUserEmails ( ) : ActiveQuery
getCmsUserPhones ( ) : ActiveQuery
getDisplayName ( ) : string
getFavoriteCmsContentElements ( ) : ActiveQuery
getId ( )
getImage ( ) : ActiveQuery
getLastActivityAgo ( ) : integer Время проявления последней активности на сайте
getLastAdminActivityAgo ( ) : integer Время проявления последней активности на сайте
getPageUrl ( string $action = 'view', array $params = [] ) : string TODO: Is depricated > 2.7.1
getProfileUrl ( string $action = 'view', array $params = [] ) : string
getProtectedUsernames ( ) : array Логины которые нельзя удалять, и нельзя менять
getRoleNames ( ) : array
getRoles ( ) : Role[]
getStorageFiles ( ) : ActiveQuery
getUserAuthClients ( ) : ActiveQuery
init ( )
isPasswordResetTokenValid ( string $token ) : boolean Finds out if password reset token is valid
lockAdmin ( ) Установка последней активности пользователя. Больше чем в настройках.
populate ( ) Заполнить модель недостающими данными, которые необходимы для сохранения пользователя
removePasswordResetToken ( ) Removes password reset token
rules ( )
setPassword ( string $password ) Generates password hash from password and sets it to the model
setRoleNames ( array $roleNames = [] )
tableName ( )
updateLastActivity ( ) Обновление времени последней актиности пользователя.
updateLastAdminActivity ( ) Обновление времени последней актиности пользователя.
validateAuthKey ( $authKey )
validatePassword ( string $password ) : boolean Validates password

Method Details

_cmsAfterSave() public method

public _cmsAfterSave ( $e )

attributeLabels() public method

public attributeLabels ( )

behaviors() public method

public behaviors ( )

checkDataBeforeDelete() public method

public checkDataBeforeDelete ( $e )

extraFields() public method

public extraFields ( )

findByEmail() public static method

Finds user by email
public static findByEmail ( $email ) : static
$email
return static

findByPasswordResetToken() public static method

Finds user by password reset token
public static findByPasswordResetToken ( string $token ) : static | null
$token string password reset token
return static | null

findByPhone() public static method

public static findByPhone ( $phone ) : null | CmsUser
$phone
return null | CmsUser

findByUsername() public static method

Finds user by username
public static findByUsername ( string $username ) : static
$username string
return static

findByUsernameOrEmail() public static method

Поиск пользователя по email или логину
public static findByUsernameOrEmail ( $value ) : User
$value
return User

findIdentity() public static method

public static findIdentity ( $id )

findIdentityByAccessToken() public static method

public static findIdentityByAccessToken ( $token, $type = null )

generateAuthKey() public method

Generates "remember me" authentication key
public generateAuthKey ( )

generatePasswordResetToken() public method

Generates new password reset token

generateUsername() public method

Генерация логина пользователя
public generateUsername ( )

getAuthKey() public method

public getAuthKey ( )

getAvatarSrc() public method

public getAvatarSrc ( integer $width = 50, integer $height = 50, $mode = ManipulatorInterface::THUMBNAIL_OUTBOUND ) : mixed | null | string
$width integer
$height integer
$mode
return mixed | null | string

getCmsContentElement2cmsUsers() public method

public getCmsContentElement2cmsUsers ( ) : ActiveQuery
return yii\db\ActiveQuery

getCmsUserAuthClients() public method

public getCmsUserAuthClients ( ) : ActiveQuery
return yii\db\ActiveQuery

getCmsUserEmails() public method

public getCmsUserEmails ( ) : ActiveQuery
return yii\db\ActiveQuery

getCmsUserPhones() public method

public getCmsUserPhones ( ) : ActiveQuery
return yii\db\ActiveQuery

getDisplayName() public method

public getDisplayName ( ) : string
return string

getFavoriteCmsContentElements() public method

public getFavoriteCmsContentElements ( ) : ActiveQuery
return yii\db\ActiveQuery

getId() public method

public getId ( )

getImage() public method

public getImage ( ) : ActiveQuery
return yii\db\ActiveQuery

getLastActivityAgo() public method

Время проявления последней активности на сайте
public getLastActivityAgo ( ) : integer
return integer

getLastAdminActivityAgo() public method

Время проявления последней активности на сайте

getPageUrl() public method

TODO: Is depricated > 2.7.1
public getPageUrl ( string $action = 'view', array $params = [] ) : string
$action string
$params array
return string

getProfileUrl() public method

public getProfileUrl ( string $action = 'view', array $params = [] ) : string
$action string
$params array
return string

getProtectedUsernames() public static method

Логины которые нельзя удалять, и нельзя менять
public static getProtectedUsernames ( ) : array
return array

getRoleNames() public method

public getRoleNames ( ) : array
return array

getRoles() public method

public getRoles ( ) : Role[]
return yii\rbac\Role[]

getStorageFiles() public method

public getStorageFiles ( ) : ActiveQuery
return yii\db\ActiveQuery

getUserAuthClients() public method

public getUserAuthClients ( ) : ActiveQuery
return yii\db\ActiveQuery

init() public method

public init ( )

isPasswordResetTokenValid() public static method

Finds out if password reset token is valid
public static isPasswordResetTokenValid ( string $token ) : boolean
$token string password reset token
return boolean

lockAdmin() public method

Установка последней активности пользователя. Больше чем в настройках.
public lockAdmin ( )

populate() public method

Заполнить модель недостающими данными, которые необходимы для сохранения пользователя
public populate ( )

removePasswordResetToken() public method

Removes password reset token

rules() public method

public rules ( )

setPassword() public method

Generates password hash from password and sets it to the model
public setPassword ( string $password )
$password string

setRoleNames() public method

public setRoleNames ( array $roleNames = [] )
$roleNames array

tableName() public static method

public static tableName ( )

updateLastActivity() public method

Только в том случае, если время его последней актиности больше 10 сек.
public updateLastActivity ( )

updateLastAdminActivity() public method

Только в том случае, если время его последней актиности больше 10 сек.

validateAuthKey() public method

public validateAuthKey ( $authKey )

validatePassword() public method

Validates password
public validatePassword ( string $password ) : boolean
$password string password to validate
return boolean if password provided is valid for current user

Property Details

$_roleNames protected property

protected $_roleNames