#8677: FE login redirect after logout does not work.
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 29 Aug 2008 18:50:23 +0000 (18:50 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 29 Aug 2008 18:50:23 +0000 (18:50 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4028 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php

index f170561..b653b54 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 
+2008-08-29  Martin Kutschker  <masi@typo3.org>
+
+       * Fixed bug #8677: FE login redirect after logout does not work (thanx to Steffen Kamper)
+
 2008-08-27  Martin Kutschker  <masi@typo3.org>
 
        * Added feature #9204: Allow icons in select of tt_content CE plugin (list_type; implementation by Steffen Kamper)
index 0404bc5..e27d714 100644 (file)
@@ -210,7 +210,12 @@ class tx_felogin_pi1 extends tslib_pibase {
                $markerArray['###STORAGE_PID###'] = $this->spid;
                $markerArray['###USERNAME###'] = htmlspecialchars($GLOBALS['TSFE']->fe_user->user['username']);
                $markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
-
+               
+               if ($this->redirectUrl) {
+                               // use redirectUrl for action tag because of possible access restricted pages
+                       $markerArray['###ACTION_URI###'] = $this->redirectUrl;
+                       $this->redirectUrl = '';
+               }
                return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray);
        }
 
@@ -395,10 +400,10 @@ class tx_felogin_pi1 extends tslib_pibase {
                                                        }
                                                break;
                                        }
-                               } elseif ($this->logintype === 'logout') { // after logout
+                               } elseif ($this->logintype === 'logout' || !$this->logintype) { // after logout
 
                                        // Hook for general actions after after logout has been confirmed
-                                       if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']) {
+                                       if ($this->logintype === 'logout' && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed']) {
                                                $_params = array();
                                                foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['logout_confirmed'] as $_funcRef) {
                                                        if ($_funcRef) {