CMSB Acting Weirdly

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

By northernpenguin - August 19, 2016

When I login as a user, and go to the minutes.php page, I see all the BOD Minutes.  When I logoff, nothing changes, however if I try to go to the profile.php page, I am told that I am not logged in.

If I display $CURRENT_USER['position"], the value is "Director".  It shouldn't be.

--
northernpenguin
Northern Penguin Technologies

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

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