api-login change creds
This commit is contained in:
1 parent
932ea915de
commit
ecd32b6529
2 files changed
+16
-5
No files matched your search
@@ -120,6 +120,17 @@ class User extends ActiveRecord implements IdentityInterface, UserRbacInterface
|
||||
return static::findOne(['username' => $username, 'status' => self::STATUS_ACTIVE]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds user by email
|
||||
*
|
||||
* @param string $email
|
||||
* @return static|null
|
||||
*/
|
||||
public static function findByEmail($email)
|
||||
{
|
||||
return static::findOne(['username' => $email, 'status' => self::STATUS_ACTIVE]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds user by password reset token
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user