Class common\models\User
| Inheritance | common\models\User » yii\db\ActiveRecord | 
|---|---|
| Implements | yii\web\IdentityInterface | 
User model
Public Methods
| Method | Description | Defined By | 
|---|---|---|
| behaviors() | common\models\User | |
| findByPasswordResetToken() | Finds user by password reset token | common\models\User | 
| findByUsername() | Finds user by username | common\models\User | 
| findIdentity() | common\models\User | |
| findIdentityByAccessToken() | common\models\User | |
| generateAuthKey() | Generates "remember me" authentication key | common\models\User | 
| generatePasswordResetToken() | Generates new password reset token | common\models\User | 
| getAuthKey() | common\models\User | |
| getId() | common\models\User | |
| isPasswordResetTokenValid() | Finds out if password reset token is valid | common\models\User | 
| removePasswordResetToken() | Removes password reset token | common\models\User | 
| rules() | common\models\User | |
| setPassword() | Generates password hash from password and sets it to the model | common\models\User | 
| tableName() | common\models\User | |
| validateAuthKey() | common\models\User | |
| validatePassword() | Validates password | common\models\User | 
Constants
| Constant | Value | Description | Defined By | 
|---|---|---|---|
| STATUS_ACTIVE | 10 | common\models\User | |
| STATUS_DELETED | 0 | common\models\User | 
Method Details
| public void behaviors ( ) | 
Finds user by password reset token
| public static static|null findByPasswordResetToken ( $token ) | ||
| $token | string | Password reset token | 
Finds user by username
| public static static|null findByUsername ( $username ) | ||
| $username | string | |
| public static void findIdentity ( $id ) | ||
| $id | ||
| public static void findIdentityByAccessToken ( $token, $type = null ) | ||
| $token | ||
| $type | ||
Generates "remember me" authentication key
| public void generateAuthKey ( ) | 
Generates new password reset token
| public void generatePasswordResetToken ( ) | 
| public void getAuthKey ( ) | 
| public void getId ( ) | 
Finds out if password reset token is valid
| public static boolean isPasswordResetTokenValid ( $token ) | ||
| $token | string | Password reset token | 
Removes password reset token
| public void removePasswordResetToken ( ) | 
| public void rules ( ) | 
Generates password hash from password and sets it to the model
| public void setPassword ( $password ) | ||
| $password | string | |
| public static void tableName ( ) | 
| public void validateAuthKey ( $authKey ) | ||
| $authKey | ||
Validates password
| public boolean validatePassword ( $password ) | ||
| $password | string | Password to validate | 
| return | boolean | If password provided is valid for current user | 
|---|---|---|