Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Fixing the redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Oct 1, 2015
1 parent 3539dc8 commit 38e0e72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Controller/Component/UserToolComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ public function mapAction() {
public function _handleUserBeingAlreadyLoggedIn(array $options) {
$Auth = $this->_getAuthObject();
if ((bool)$Auth->user()) {
if ($options['alreadyLoggedInFlashOptions'] === null) {
$options['alreadyLoggedInRedirectUrl'] = $Auth->redirectUrl();
if ($options['alreadyLoggedInRedirectUrl'] === null) {
$options['alreadyLoggedInRedirectUrl'] = $this->request->referer();
}
$this->handleFlashAndRedirect('alreadyLoggedIn', $options);
}
Expand Down Expand Up @@ -419,7 +419,7 @@ protected function _afterLogin($user, array $options) {
$Auth = $this->_getAuthObject();
$Auth->setUser($user);
if ($options['successRedirectUrl'] === null) {
$options['successRedirectUrl'] = $this->request->referer();
$options['successRedirectUrl'] = $Auth->redirectUrl();
}
$this->handleFlashAndRedirect('success', $options);
return true;
Expand Down

0 comments on commit 38e0e72

Please sign in to comment.