api-login change creds
This commit is contained in:
@ -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