Forums / Developer / Login redirection. / Comment39601
Lazaro Ferreira
Saturday 13 November 2004 4:14:28 am
Hi Angel,
You don't have problem the second time, because at that time the user is already logged on to the system, so the login form is automatically bypassed by Exponential
One solution is to add or change the hidden field RedirectURI in your login form (you will have to override user/login.tpl ), that way when Exponential finish login on the user it will automatically redirect the user to the url you want
You can also add there a template code that check if the user is already log on :
Could be something like :
{let current_user=fetch('user','current_user') } {section show=$current_user.contentobject.main_parent_node_id|eq(REPLACE_BY_YOUR_ANONYMOUS_NODE_ID_HERE)} <input type="hidden" name="RedirectURI" value="HERE_PUT_YOUR_FORM_URL_USING_EZURL()_OPERATOR_TO}" /> {section-else} <input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" /> {/section} {/let}
Lazaro http://www.mzbusiness.com