CMSB Acting Weirdly

16 posts by 4 authors in: Forums > CMS Builder
Last Post: August 19, 2016   (RSS)

By gregThomas - August 19, 2016

Hi northern penguin,

I've also come across a similar issue before, in my case the server was using cloud flair for caching the pages. Cloud flair was caching the pages from when the user was logged in after they had logged out. Is your hosting running any type of caching service? 

For some reason Websitemembership plugin won't let me logoff this page (minutes).  It does actually logoff, but the value of $CURRENT_User['position'] is still "director", so it displays the BOD Minutes, which it shouldn't.

How are you able to tell that the user is logged off? Is it because users are not able to access pages which require the them to be logged in?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - August 19, 2016

This sounds like it's specific to the BOD Minutes page then. Is the $CURRENT_USER['position'] variable set in the users account, or is it set in a variable in the BOD minutes file? Would it be possible to add the code for the BOD Minutes page in a post for me?

Greg Thomas







PHP Programmer - interactivetools.com

By northernpenguin - August 19, 2016

The $CURRECT_USER['position'] is defined per user in their specific account.  I have attached the file minutes.php

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

minutes.php 10K

By gregThomas - August 19, 2016

I've found the problem, on line 146 you have the following code:

<?php if ($CURRENT_USER['position'] == 'SiteAdmin' || $CURRENT_USER['position'] == 'SiteAdmin/Director' || $CURRENT_USER['position'] = 'Director' ): ?>

This line needs needs another equal sign adding to validate the position:

<?php if ($CURRENT_USER['position'] == 'SiteAdmin' || $CURRENT_USER['position'] == 'SiteAdmin/Director' || $CURRENT_USER['position'] == 'Director' ): ?>

At the moment the code is setting the position to Director, not checking if it matches the value. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By northernpenguin - August 19, 2016 - edited: August 19, 2016

Greg:  Works!

Thanks Greg

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke