Skip to content

Commit

Permalink
[fix] - authorization error in MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
krivochenko committed Nov 2, 2017
1 parent 35f166a commit b0a9bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/User.php
Expand Up @@ -131,7 +131,7 @@ public static function findIdentityByAccessToken($token, $type = null)
*/
public static function findByEmailOrUserName($email)
{
return static::find()->where(['and', '"status"=:status', ['or', '"email"=:email', '"username"=:username']], [':status' => self::STATUS_ACTIVE, ':email' => $email, ':username' => $email])->one();
return static::find()->where(['and', ['status' => self::STATUS_ACTIVE], ['or', ['email' => $email], ['username' => $email]]])->one();
}

/**
Expand Down

0 comments on commit b0a9bbb

Please sign in to comment.