![]() |
is_moderator function always returns true in pp-inc.php there is a function called is_moderators The very first test is: if ( $User['adminedit'] == 1 || $Globals['modprivs'] == "yes" ) return( true ); Meaning... if the user is an admin, return true OR if $Globals['modprivs'] == "yes" return true Something seems whacko... the: $Globals['modprivs'] is defined in the setup as: Do you want moderators to have global rights? Set this to NO if you want to assign moderators to specific categories I wanted my mods to have global rights so I set this to "yes". Because of this setting and the IF statement in is_moderator.... EVERYONE is being cleared as an "is_moderator". Talk about MAJOR issues... I have normal members being tagged as an "is_moderator" because of that "$Globals['modprivs']" setting !!!! I think there needs to be an additional IF in there based on: $User['moderator'] == 1 ) I changed it to two separate IFs if ( $User['adminedit'] == 1 ) { return( true ); } if ( $User['moderator'] == 1 && $Globals['modprivs'] == "yes" ) { return( true ); } . |
The code below is totally valid. Next in the code it checks category mods. It returns true if the global mod is turned on Code: Content visible to verified customers only.See look how it looks in the code Code: Content visible to verified customers only. |
Quote:
English translation please.... >The code below is totally valid. it is NOT valid code Chuck... gad... if you have "$Globals['modprivs'] == "yes" ) saying let your mods have global access, the function will ALWAYS return true - it will NEVER get to checking the category mods. I don't know why I put myself through this... it's like an everyday occurance of one bug after another, and then when it's brought to your attention, it's an arguement. No docs, no explantion of features, how-to's etc... deleting listings without explaining that it will happen everytime you go into the admin panel... huge chunks of code taken from the photo software making prompts and messages leaving the user with "huh???" I'm done with this Chuck... this is my last report... from here on out, I'll let you find the bugs. . |
As I have stated there is no bug. Break down the logic of the routine. You are surrounding a function with an if clause like this Code: Content visible to verified customers only.Next in the function you have two things global mods and category mods. If you have the global mod switch set to yes meaning a moderator can mod every cat then it should be true hense this line. Code: Content visible to verified customers only.Your initial post suggests there should be something that checks is the person is a mod and in my initial response I even posted a chunk right from our program and have done so again showing the function your referring to is contained in an if clause saying only do this is $User['moderator'] == 1 So there is no bug here. |
| All times are GMT -5. The time now is 11:02 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0