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