Active
Project:
Login Destination
Version:
6.x-2.12
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2012 at 05:10 UTC
Updated:
10 Feb 2012 at 20:31 UTC
I need to write a php snippit or something... that does the following:
If you login from the front page login block, re-direct to the front page (currently goes to user page)
if you login from any page other than the front page, preserve destination.
I know i can use an elseif statement for this but I don't have any idea how to say "if front" or do the preserve destination bit.....
Any guidance?
Rebecca
Comments
Comment #1
mithy commentedYou can set to always preserve destination and then unset it for certain cases:
unset($_GET['destination'])Comment #2
beckyjohnson commentedOK, That sounds interesting. Do I have to write the($_GET['destination']) in function?
Rebecca
Comment #3
mithy commentedI do not understand what you mean exactly. Unset is a function. You have to use it in a snippet in the condition where you do not want to preserve the destination.
Comment #4
beckyjohnson commentedI was thinking about this and what i don't really understand is why preserve destination doesn't work in the first place, on the front page. If you login from the front page, it takes you to the user page, and doesn't leave you on the front page..... ugh