creating a session in the front end
Posted: Thu Oct 11, 2007 10:26 am
I have a site that has a login area that is (for reasons not relavant here) not part of CMSMS.
However, once the user is logged in, they occasionally move into the pages that are controlled by CMSMS. In the pages there are two elements i would like to hide to logged in users (the login form and the register button - both html in the template and not controlled by cmsms)
I have created a user tag {session} which I am calling at the top of the template as follows -
session_start();
$showstuff ="yes";
if ($_SESSION['hav_logged_in'] == 'true') {
$showstuff = "no";
}
the idea being that I can then create smarties to show the html elements accordingly using the $showstuff variable as a control.
However, the session is not working.
Can anyone help on this? Is there a CMSMS frontend session that is part of the system which could be creating the issue?
thanks
John
However, once the user is logged in, they occasionally move into the pages that are controlled by CMSMS. In the pages there are two elements i would like to hide to logged in users (the login form and the register button - both html in the template and not controlled by cmsms)
I have created a user tag {session} which I am calling at the top of the template as follows -
session_start();
$showstuff ="yes";
if ($_SESSION['hav_logged_in'] == 'true') {
$showstuff = "no";
}
the idea being that I can then create smarties to show the html elements accordingly using the $showstuff variable as a control.
However, the session is not working.
Can anyone help on this? Is there a CMSMS frontend session that is part of the system which could be creating the issue?
thanks
John