[TYPO3] automatic FE logout after login

Andreas Balzer eMail at andreas-balzer.de
Thu Apr 20 16:56:42 CEST 2006


Andreas Balzer schrieb:
> Dmitry Dulepov schrieb:
>> Hi!
>>
>> Andreas Balzer wrote:
>>> i'm using newloginbox.. is it possible with that and how? I mean i don't
>>> want t logout box, i just want the user to be logged out automatic..
>>
>> No, not possible with newloginbox...
>>
>> Here is how I would do it. Create a file in fileadmin/user_logoff.php
>> with this content (between equal signs but not including them):
>> =========================
>> <?
>> function user_logoff() {
>>     global $TSFE;
>>
>>     if ($TSFE->loginUser) {
>>         $TSFE->fe_user->logoff();
>>     }
>>     return '';
>> }
>> ?>
>> =========================
>>
>> and add the following to your TS setup of the page where you want
>> autologoff:
>>
>> =========================
>> includeLibs.user_logoff = fileadmin/user_logoff.php
>> page.10000 = USER_INT
>> page.10000.userFunc = user_logoff
>> =========================
>>
>> Dmitry.
> 
> Hi!
> Thanks for the answer. Well, it works quite well but i have another big 
> problem now. To point that out, i'll try to explain how my pages are 
> structured:
> 
> I have a page called "create username". In that page you are asked for 
> an accesskey. This is done by the newloginbox and a special usergroup, 
> called mepde7. After you logged in with that userdatas, the login form 
> becomes unvisible and you see a sitemap with a link to continue the 
> wizard. The page that is shown there is restricted in view by the 
> usergroup. So only if you are logged in with the accesskey, you see the 
> link. The link consists of an shortcut to an other page, which is hidden 
> in menu (but not unvisible) and has no user restrictions. This page 
> consists of your script at the top and a register form at the bottom. At 
> this time the access key has to be "logged out", so that you can 
> register a new user and do not have the possibility to edit that special 
> user..
> 
> Ok.. The problem: After you click at the link in the sitebar, you'll get 
> a 404. The page seems to do not exist.. Well, the final page has no user 
> restrictions and the user becomes logged out at this last page in the 
> middle of the template.. So it *should* work, but it doesn't.. :-/
> 
> Do you have any ideas, what i'm doing wrong?
> 
> Thanks for any help
> 
> Andreas
hm.. i tried to solve the problem in creating a page on top (one level 
higher in pagetree) of the last page. This top page is set to unvisible 
in menu but not unvisible at all, and the last page is set to visible in 
menu again.. The problem: The user does not become logged out... :-/



More information about the TYPO3-english mailing list