Archived
1
0
Fork 0

app/models/Data/User.php: in findFirstByEmail() only fetch rows with Status != deleted.

This commit is contained in:
Henrik Hautakoski 2018-08-15 21:40:26 +02:00
parent ec5c6f2d14
commit aced9f8bf3
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -361,8 +361,8 @@ class User extends Model
static public function findFirstByEmail($email)
{
return self::findFirst([
"email = :email: AND status = :s:",
"bind" => [ 'email' => $email, 's' => self::STATUS_ACTIVE ]
"email = :email: AND status != :s:",
"bind" => [ 'email' => $email, 's' => self::STATUS_DELETED ]
]);
}