Wrong username fix
This commit is contained in:
parent
e2b3f3fad3
commit
cddc6a0a49
|
@ -563,6 +563,7 @@ class user
|
|||
}
|
||||
$this->auth->loginWithUsername($name, $password, $rememberDuration);
|
||||
}
|
||||
//TODO: translate errors code
|
||||
catch (\Delight\Auth\InvalidEmailException $e) {
|
||||
$this->tools->profiler_stop();
|
||||
return ["status" => "error", "code" => 010, "text" => "Wrong email address"];
|
||||
|
@ -575,6 +576,10 @@ class user
|
|||
$this->tools->profiler_stop();
|
||||
return ["status" => "error", "code" => 012, "text" => "Email not verified"];
|
||||
}
|
||||
catch (\Delight\Auth\UnknownUsernameException $e) {
|
||||
$this->tools->profiler_stop();
|
||||
return ["status" => "error", "code" => 013, "text" => "Wrong username"];
|
||||
}
|
||||
catch (\Delight\Auth\TooManyRequestsException $e) {
|
||||
$this->tools->profiler_stop();
|
||||
return ["status" => "error", "code" => 020, "text" => "Too many requests"];
|
||||
|
|
Loading…
Reference in New Issue