PHP Class amnah\yii2\user\models\User

Inheritance: extends yii\db\ActiveRecord, implements yii\web\IdentityInterface
Afficher le fichier Open project: amnah/yii2-user Class Usage Examples

Méthodes publiques

Свойство Type Description
$currentPassword Current password - for account page updates
$module amnah\yii2\user\Module
$newPassword New password - for registration and changing password
$newPasswordConfirm New password confirmation - for reset

Protected Properties

Свойство Type Description
$permissionCache Permission cache array

Méthodes publiques

Méthode Description
attributeLabels ( )
beforeSave ( $insert )
behaviors ( )
can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean Check if user can do specified $permission
checkEmailChange ( ) : string | boolean Check for email change
confirm ( string $newEmail ) : boolean Confirm user email
findIdentity ( $id )
findIdentityByAccessToken ( $token, $type = null )
getAuthKey ( )
getDisplayName ( ) : string | integer Get display name for the user
getId ( )
getProfile ( ) : ActiveQuery
getRole ( ) : ActiveQuery
getUserAuths ( ) : ActiveQuery
getUserTokens ( ) : ActiveQuery
init ( )
rules ( )
sendEmailConfirmation ( amnah\yii2\user\models\UserToken $userToken ) : integer Send email confirmation to user
setRegisterAttributes ( integer $roleId, string $status = null ) : static Set attributes for registration
statusDropdown ( ) : array Get list of statuses for creating dropdowns
updateLoginMeta ( ) : boolean Update login info (ip and time)
validateAuthKey ( $authKey )
validateCurrentPassword ( ) Validate current password (account page)
validatePassword ( string $password ) : boolean Validate password

Method Details

attributeLabels() public méthode

public attributeLabels ( )

beforeSave() public méthode

public beforeSave ( $insert )

behaviors() public méthode

public behaviors ( )

can() public méthode

Check if user can do specified $permission
public can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean
$permissionName string
$params array
$allowCaching boolean
Résultat boolean

checkEmailChange() public méthode

Check for email change
public checkEmailChange ( ) : string | boolean
Résultat string | boolean

confirm() public méthode

Confirm user email
public confirm ( string $newEmail ) : boolean
$newEmail string
Résultat boolean

findIdentity() public static méthode

public static findIdentity ( $id )

findIdentityByAccessToken() public static méthode

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

getAuthKey() public méthode

public getAuthKey ( )

getDisplayName() public méthode

Get display name for the user
public getDisplayName ( ) : string | integer
Résultat string | integer

getId() public méthode

public getId ( )

getProfile() public méthode

public getProfile ( ) : ActiveQuery
Résultat yii\db\ActiveQuery

getRole() public méthode

public getRole ( ) : ActiveQuery
Résultat yii\db\ActiveQuery

getUserAuths() public méthode

public getUserAuths ( ) : ActiveQuery
Résultat yii\db\ActiveQuery

getUserTokens() public méthode

public getUserTokens ( ) : ActiveQuery
Résultat yii\db\ActiveQuery

init() public méthode

public init ( )

rules() public méthode

public rules ( )

sendEmailConfirmation() public méthode

Send email confirmation to user
public sendEmailConfirmation ( amnah\yii2\user\models\UserToken $userToken ) : integer
$userToken amnah\yii2\user\models\UserToken
Résultat integer

setRegisterAttributes() public méthode

Set attributes for registration
public setRegisterAttributes ( integer $roleId, string $status = null ) : static
$roleId integer
$status string
Résultat static

statusDropdown() public static méthode

Get list of statuses for creating dropdowns
public static statusDropdown ( ) : array
Résultat array

updateLoginMeta() public méthode

Update login info (ip and time)
public updateLoginMeta ( ) : boolean
Résultat boolean

validateAuthKey() public méthode

public validateAuthKey ( $authKey )

validateCurrentPassword() public méthode

Validate current password (account page)

validatePassword() public méthode

Validate password
public validatePassword ( string $password ) : boolean
$password string
Résultat boolean

Property Details

$currentPassword public_oe property

Current password - for account page updates
public $currentPassword

$module public_oe property

public Module,amnah\yii2\user $module
Résultat amnah\yii2\user\Module

$newPassword public_oe property

New password - for registration and changing password
public $newPassword

$newPasswordConfirm public_oe property

New password confirmation - for reset
public $newPasswordConfirm

$permissionCache protected_oe property

Permission cache array
protected $permissionCache