Page 1 of 1

How to: integrate other scripts with CMS via Session variables

Posted: Tue Feb 07, 2006 6:07 am
by pandamonium54
I'd ask this on the irc channel, but my school blocks all irc connections...

I want to have some form of password protection on some pages. These pages should only be viewable by backend users/admins/etc. For example, I removed all password protection from the administration section of a photo gallery, and would like all CMS users to have equal administrative rights to the photo gallery.

Instead of using .htaccess and maintaining a second set of passwords, I wanted to set a session variable like "authenticuser=yes" when a backend user logs in. I can't seem to access the session variables though. I feel like this issue is more php based, but I don't know what parts of CMS to modify to make this work.

Thanks!

Re: How to: integrate other scripts with CMS via Session variables

Posted: Tue Feb 07, 2006 11:21 am
by Ted
By default sessions are turned off on the frontend.  In include.php, comment out:

Code: Select all

if(!@session_id() && (isset($_REQUEST[session_name()]) || isset($CMS_ADMIN_PAGE))) {
and uncomment:

Code: Select all

#if(!@session_id()) {
That should fix your problem.  I guess that should be a config.php option...