[TYPO3] automatic FE logout after login

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


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



More information about the TYPO3-english mailing list