Commit 8dd41b9d authored by Roman Ondráček's avatar Roman Ondráček

Core: fix redirect after sign in

Signed-off-by: Roman Ondráček's avatarRoman Ondráček <ondracek.roman@centrum.cz>
parent 5d83d9f5
Pipeline #2378 passed with stages
in 16 minutes and 20 seconds
......@@ -79,11 +79,10 @@ class SignInFormFactory {
$user->setExpiration($values->remember === true ? '14 days' : '30 minutes');
$user->login($values->username, $values->password);
$this->presenter->flashSuccess('core.sign.inForm.messages.success');
if ($this->presenter->backlink === null) {
$this->presenter->redirect('Homepage:default');
} else {
if ($this->presenter->backlink !== null) {
$this->presenter->restoreRequest($this->presenter->backlink);
}
$this->presenter->redirect('Homepage:default');
} catch (AuthenticationException $e) {
$this->presenter->flashError('core.sign.inForm.messages.incorrectUsernameOrPassword');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment