FIX: separate details exception
This commit is contained in:
@ -167,8 +167,13 @@ class Login
|
|||||||
try {
|
try {
|
||||||
$login = $this->repository->fetchActiveByUser($user->id);
|
$login = $this->repository->fetchActiveByUser($user->id);
|
||||||
$this->logout($login->user);
|
$this->logout($login->user);
|
||||||
} catch (PDOException | EmptyResult $exception) {
|
} catch (EmptyResult $exception) {
|
||||||
error_log($exception.PHP_EOL, 3, '/logs/exception.log');
|
$message []= "No logins for user {$user->name}";
|
||||||
|
$message []= $exception->getMessage();
|
||||||
|
$message []= $exception->getTraceAsString();
|
||||||
|
error_log(implode(PHP_EOL, $message).PHP_EOL, 3, '/logs/login-exception.log');
|
||||||
|
} catch (PDOException $exception) {
|
||||||
|
error_log($exception.PHP_EOL, 3, '/logs/login-exception.log');
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -185,7 +190,7 @@ class Login
|
|||||||
$this->saveCookie($selector, $token, $login->dateTime->add(new DateInterval("PT{$this->max_login_time}H")));
|
$this->saveCookie($selector, $token, $login->dateTime->add(new DateInterval("PT{$this->max_login_time}H")));
|
||||||
return true;
|
return true;
|
||||||
} catch (PDOException | Exception $exception) {
|
} catch (PDOException | Exception $exception) {
|
||||||
error_log($exception.PHP_EOL, 3, '/logs/exception.log');
|
error_log($exception.PHP_EOL, 3, '/logs/login-exception.log');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user