app/models/Data/User.php: findFirstByUsernameOrEmail() should only fetch rows where status != deleted
This commit is contained in:
parent
82fb869042
commit
1e46302267
1 changed files with 2 additions and 2 deletions
|
|
@ -359,8 +359,8 @@ class User extends Model
|
||||||
static public function findFirstByUsernameOrEmail($value)
|
static public function findFirstByUsernameOrEmail($value)
|
||||||
{
|
{
|
||||||
return self::findFirst([
|
return self::findFirst([
|
||||||
"(email = :v: OR username = :v:) AND status = :s:",
|
"(email = :v: OR username = :v:) AND status != :s:",
|
||||||
"bind" => [ 'v' => $value, 's' => self::STATUS_ACTIVE ]
|
"bind" => [ 'v' => $value, 's' => self::STATUS_DELETED ]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue