Archived
1
0
Fork 0

app/models/Data/User.php: in findFirstByOAuthID() also only fetch rows where status != deleted

This commit is contained in:
Henrik Hautakoski 2018-08-15 21:48:29 +02:00
parent 0bf7c54539
commit 9bd0ef86fc
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -385,8 +385,8 @@ class User extends Model
$column = strtolower($oauth->getProvider());
return self::findFirst([
"{$column}_id = :id:",
"bind" => [ 'id' => $oauth->getId() ]
"{$column}_id = :id: AND status != :s:",
"bind" => [ 'id' => $oauth->getId(), 's' => self::STATUS_DELETED ]
]);
}