[TYPO3] Redirect at Login problem

Olivier Dobberkau olivier.dobberkau at dkd.de
Thu Jan 12 10:58:36 CET 2006


Marlies C wrote:
> We are using the dkd_redirect_at_login extension and it does what we want. 
> But now we also want to hide a specific page after login. Without the 
> extension we can use 'Access: Hide at login', but with the extension this 
> does not work.
> 
> How can we work around it? Is there another way to redirect after login than 
> using the extension or else how can we hide the page after login? I could 
> not find an answer in the archive. Has anybody found a solution to this 
> problem?

hi marlies,

the extension was written for version 3.5 and works there.
please do not expect it to work with any other version. :-(

have a look at the pi classes.

class tx_dkdredirectatlogin {
     function main($conf,$parentObj) {
         if(!$conf['redirect_url']) {
 
if($GLOBALS["TSFE"]->fe_user->user['tx_dkdredirectatlogin_redirectpage']) {
                 $redirectPage = 
$GLOBALS["TSFE"]->fe_user->user['tx_dkdredirectatlogin_redirectpage'];
             } else {
                 $groupData = $GLOBALS["TSFE"]->fe_user->groupData;
                 $query = "SELECT tx_dkdredirectatlogin_redirectpage 
FROM ".$GLOBALS["TSFE"]->fe_user->usergroup_table." WHERE 
tx_dkdredirectatlogin_redirectpage AND uid IN 
(".implode(",",$groupData["uid"]).") ORDER BY uid";
                 $res = @mysql(TYPO3_db,$query);
                 while($row = mysql_fetch_assoc($res)) {
                     if($row['tx_dkdredirectatlogin_redirectpage']) {
                         $redirectPage = 
$row['tx_dkdredirectatlogin_redirectpage'];  //take the first group with 
a redirect page
                         break;
                     }
                 }
             }
             $conf['redirect_url'] = 
$parentObj->pi_getPageLink($redirectPage);
         }
         return $conf['redirect_url'];
     }
}

it could be that some dbal stuff needs to done. or that some other ext 
is preventing it to work. or that the function is already in the version 
  of typo3 you have installed...

greetings,

olivier






More information about the TYPO3-english mailing list