Class common\models\User

Inheritancecommon\models\User » yii\db\ActiveRecord
Implementsyii\web\IdentityInterface

User model

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
STATUS_ACTIVE 10 common\models\User
STATUS_DELETED 0 common\models\User

Method Details

behaviors() public method

public void behaviors ( )
findByPasswordResetToken() public static method

Finds user by password reset token

public static static|null findByPasswordResetToken ( $token )
$token string

Password reset token

findByUsername() public static method

Finds user by username

public static static|null findByUsername ( $username )
$username string
findIdentity() public static method

public static void findIdentity ( $id )
$id
findIdentityByAccessToken() public static method

public static void findIdentityByAccessToken ( $token, $type null )
$token
$type
generateAuthKey() public method

Generates "remember me" authentication key

public void generateAuthKey ( )
generatePasswordResetToken() public method

Generates new password reset token

public void generatePasswordResetToken ( )
getAuthKey() public method

public void getAuthKey ( )
getId() public method

public void getId ( )
isPasswordResetTokenValid() public static method

Finds out if password reset token is valid

public static boolean isPasswordResetTokenValid ( $token )
$token string

Password reset token

removePasswordResetToken() public method

Removes password reset token

public void removePasswordResetToken ( )
rules() public method

public void rules ( )
setPassword() public method

Generates password hash from password and sets it to the model

public void setPassword ( $password )
$password string
tableName() public static method

public static void tableName ( )
validateAuthKey() public method

public void validateAuthKey ( $authKey )
$authKey
validatePassword() public method

Validates password

public boolean validatePassword ( $password )
$password string

Password to validate

return boolean

If password provided is valid for current user