1 | <?php |
||
26 | class UserModel extends ActiveRecord implements IdentityInterface |
||
27 | { |
||
28 | /** |
||
29 | * @inheritdoc |
||
30 | */ |
||
31 | public static function tableName() |
||
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | public function rules() |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | public static function findIdentity($id) |
||
55 | |||
56 | /** |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | public static function findIdentityByAccessToken($token, $type = null) |
||
63 | |||
64 | /** |
||
65 | * Finds user by username |
||
66 | * |
||
67 | * @param string $username |
||
68 | * |
||
69 | * @return static|null |
||
70 | */ |
||
71 | public static function findByUsername($username) |
||
78 | |||
79 | /** |
||
80 | * Finds user by password reset token |
||
81 | * |
||
82 | * @param string $token password reset token |
||
83 | * |
||
84 | * @return static|null |
||
85 | */ |
||
86 | public static function findByPasswordResetToken($token) |
||
97 | |||
98 | /** |
||
99 | * Finds out if password reset token is valid |
||
100 | * |
||
101 | * @param string $token password reset token |
||
102 | * |
||
103 | * @return bool |
||
104 | */ |
||
105 | public static function isPasswordResetTokenValid($token) |
||
115 | |||
116 | /** |
||
117 | * @return mixed |
||
118 | */ |
||
119 | public static function find() |
||
126 | |||
127 | /** |
||
128 | * @return mixed |
||
129 | */ |
||
130 | public function getId() |
||
134 | |||
135 | /** |
||
136 | * @return string |
||
137 | */ |
||
138 | public function getAuthKey() |
||
142 | |||
143 | /** |
||
144 | * @param string $authKey |
||
145 | * |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function validateAuthKey($authKey) |
||
152 | |||
153 | /** |
||
154 | * Validates password |
||
155 | * |
||
156 | * @param string $password password to validate |
||
157 | * |
||
158 | * @return bool if password provided is valid for current user |
||
159 | */ |
||
160 | public function validatePassword($password) |
||
170 | |||
171 | /** |
||
172 | * Generates password hash from password and sets it to the model |
||
173 | * |
||
174 | * @param string $password |
||
175 | */ |
||
176 | public function generatePassword($password) |
||
180 | |||
181 | /** |
||
182 | * Generates "remember me" authentication key |
||
183 | */ |
||
184 | public function generateAuthKey() |
||
188 | |||
189 | /** |
||
190 | * Generates new password reset token |
||
191 | */ |
||
192 | public function generatePasswordResetToken() |
||
196 | |||
197 | /** |
||
198 | * Removes password reset token |
||
199 | */ |
||
200 | public function removePasswordResetToken() |
||
204 | |||
205 | public static function attributesMap() |
||
219 | |||
220 | public function behaviors() |
||
234 | } |
||
235 |