mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#1074 Add country select for login
This commit is contained in:
parent
edba0f4fba
commit
40eb52cca3
@ -43,7 +43,13 @@ class ValidateCredentials
|
||||
|
||||
//Is email or phone number
|
||||
if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
if ($user = $this->repository->findBy('gsm_phone', $credentials['email'])) {
|
||||
$possiblePhone = $credentials['email'];
|
||||
if (substr($credentials['email'], 0, 1) == 0) {
|
||||
$possiblePhone = substr($credentials['email'], 1);
|
||||
}
|
||||
if ($user = $this->repository
|
||||
->newQuery()
|
||||
->where('gsm_phone', 'LIKE', "%$possiblePhone")->first()) {
|
||||
$credentials['email'] = $user->email;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user