[TYPO3] FE login: redirect user if not logged in
Miroslav Monkevic
miroslavm at centras.lt
Fri Apr 7 14:31:58 CEST 2006
OK. It works like this:
If user types restricted URL (www.mydomain.com/index.php?id=123) into
the address box he obviously will land on the nearest (grand)parent of
the restricted page, where he (user) has sufficient access rights.
config.typolinkLinkAccessRestrictedPages can not help you here
Now, if there is:
a) link on your site which points to page with ID = 123
b) config.typolinkLinkAccessRestrictedPages is configured like:
config.typolinkLinkAccessRestrictedPages = 1
config.typolinkLinkAccessRestrictedPages_addParams =
&tx_srfeuserregister_pi1[backURL]=###RETURN_URL###&redirect_url=###RETURN_URL###
c) user is not logged in and therefore has no rights to access 123
Then:
Link to 123 page will automatically become not <a
href="index.php?id=123">Go to 123</a>, but (<a
href="index.php?id=1&tx_srfeuserregister_pi1[backURL]=index.php?id=123&redirect_url=index.php?id=123
">Go to 123</a>)
That's it! It is easy as 123. :)
P.S. if you are using realurl, beware of bug 3078, which prevents
###RETURN_URL### from being set properly.
Good luck.
Martin Rud wrote:
> Hi,
>
> It does not work for me.
>
> What I mean is: If page with uid = 123 i restricted, and a not logged in
> visitor tries to go into www.mydomain.com/index.php?id=123 then I want
> the visitor sent to www.mydomain.com/index.php?id=1 (a page with a login
> form).
>
> Regards, Martin
>
> Miroslav Monkevic wrote:
>> Hi Martin,
>>
>> look at config.typolinkLinkAccessRestrictedPages
>>
>> Martin Rud wrote:
>>
--
Miroslav
More information about the TYPO3-english
mailing list