app/models/Data/User.php: adding findFirstByUsername()
This commit is contained in:
parent
aced9f8bf3
commit
6876cc13be
1 changed files with 8 additions and 0 deletions
|
|
@ -366,6 +366,14 @@ class User extends Model
|
|||
]);
|
||||
}
|
||||
|
||||
static public function findFirstByUsername($username)
|
||||
{
|
||||
return self::findFirst([
|
||||
"username = :username: AND status != :s:",
|
||||
"bind" => [ 'username' => $username, 's' => self::STATUS_DELETED ]
|
||||
]);
|
||||
}
|
||||
|
||||
static public function findFirstByOAuthID(UserDataInterface $oauth)
|
||||
{
|
||||
$column = strtolower($oauth->getProvider());
|
||||
|
|
|
|||
Reference in a new issue