the Forum

Log-in to a Locked Page

Posted on October 4, 2011 by William
Total Posts: 3  |  Join date: 07-19-11

How do you code a web page in EE to detect a user's access? Is there a way to automatically push unauthorized user to a log-in page? Thanks!

Tags: There are no tags for this entry.

2 answers, add yours below

Posted on on October 5, 2011 at 12:54am
by Michael Rosario


There is this code, to detect if you are login, otherwise redirect to a template

{if logged_in}  SHOW SOMETHING HERE  {if:else} SHOW A LOGIN {/if} 

OR
{if logged_in} SHOW SOMETHING HERE  {if:else}{redirect='URI HERE'}{/if} 

So you can either redirect or show something else.

 

Posted on on October 5, 2011 at 6:44am
by William

Do you put that on the top page of the template, next to BODY: SAMPLE, or in another area?

Thanks!

 
add your answers here
comments powered by Disqus