mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
#1057 Login with mobile phone is not working
This commit is contained in:
parent
0e5a56730e
commit
21fb485467
@ -35,12 +35,10 @@ class ValidateCredentials
|
|||||||
|
|
||||||
//Is email or phone number
|
//Is email or phone number
|
||||||
if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) {
|
if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) {
|
||||||
if ($profile = $this->profile->findPhoneNumber($credentials['email'])) {
|
if ($user = $this->repository->findBy('gsm_phone', $credentials['email'])) {
|
||||||
if ($user = $this->repository->find($profile->user_id)) {
|
|
||||||
$credentials['email'] = $user->email;
|
$credentials['email'] = $user->email;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$response = $this->repository->findByCredentials($credentials);
|
$response = $this->repository->findByCredentials($credentials);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user