Jump to the post that solved this thread.
Solved: 9 Years, 4 Months, 4 Weeks ago Php coding help for awaiting approval
#11
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-11, 01:35 PM).m. Wrote: please try once again !
if (in_array($mybb->user['usergroup'], array(4,3,6,11)))

That gave it back to Mods, but still not Group 11.

.M. I really appreciate you taking the time with this, but if I'm keeping you it can wait till you have more time.
Reply
#12
Solved: 9 Years, 4 Months, 4 Weeks ago
Try a statement before the if statement:

echo "mybb->user['usergroup'] = ".$mybb->user['usergroup']."<br />mybb->usergroup['gid'] = ".$mybb->usergroup['gid']."<br /><br />";


and see what is displayed at the top of the page.
Regards, Ad Bakker (NL)
Reply
#13
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-11, 03:15 PM)Ad Bakker Wrote: Try a statement before the if statement:

echo "mybb->user['usergroup'] = ".$mybb->user['usergroup']."<br />mybb->usergroup['gid'] = ".$mybb->usergroup['gid']."<br /><br />";


and see what is displayed at the top of the page.

Admin:
mybb->user['usergroup'] = 4
mybb->usergroup['gid'] = 4

Moderator:
mybb->user['usergroup'] = 6
mybb->usergroup['gid'] =

Super Moderator:
mybb->user['usergroup'] = 3
mybb->usergroup['gid'] =

Group 11
Nothing
Reply
#14
Solved: 9 Years, 4 Months, 4 Weeks ago
So the problem is no user is found for group 11, and it has nothing to to with the if statement. It isn't reached for group 11!!

Is group 11 membership stored in additional groups for the members?
Then the coding will have to be changed!!

Later I will look further. Now it's dinner time Big Grin
Regards, Ad Bakker (NL)
Reply
#15
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-11, 03:40 PM)Ad Bakker Wrote: So the problem is no user is found for group 11, and it has nothing to to with the if statement. It isn't reached for group 11!!

Sorry you have gone over my head now.

There is one user showing in admin CP for group 11, if I log in as that user I can see the red thread and post along with the numbers in brackets (*) saying approvals are needed but can't see the notification alerts that Mods and Admin see that are created form the information I took from here: http://community.mybb.com/thread-84847-p...#pid669564



No group 11 is in the users primary group.

Thank you Ad, no rush enjoy your food.
Reply
#16
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-11, 03:51 PM)sarisisop Wrote: no rush enjoy your food.

Saterday is easy meal day Wink .

I think the problem lies in line 593 of global.php:

if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))

Change that to:

if($can_access_moderationqueue || ($mybb->user['ismoderator'] && ($mybb->usergroup['canmodcp'] == 1 || $mybb->user['usergroup'] == 11) && $mybb->usergroup['canmanagereportedcontent'] == 1))

assuming that can_accces_moderationqueue and canmanagereportedcontent are both set to on/yes for usergroup 11.
Regards, Ad Bakker (NL)
Reply
#17
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-11, 04:29 PM)Ad Bakker Wrote:
(2015-07-11, 03:51 PM)sarisisop Wrote: no rush enjoy your food.

Saterday is easy meal day Wink .

I think the problem lies in line 593 of global.php:

if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))

Change that to:

if($can_access_moderationqueue || ($mybb->user['ismoderator'] && ($mybb->usergroup['canmodcp'] == 1 || $mybb->user['usergroup'] == 11) && $mybb->usergroup['canmanagereportedcontent'] == 1))

assuming that can_accces_moderationqueue and canmanagereportedcontent are both set to on/yes for usergroup 11.

That got it Ad, I had hoped to do it without group 11 having access to the ModCP but it's no big deal as they can only perform Approve/Unapprove.

Thank you very much Ad, and you too .M. for the help, I appreciate it.



I do have another question related, but I have started another thread: http://community.mybb.com/thread-173075.html
Reply
#18
Solved: 9 Years, 4 Months, 4 Weeks ago
Hello Ad I'm not sure if I should bump this thread even though I marked it as solved, but I have a problem with Additional User Groups and thought it would be better here as it's related.

If a member of Group 11 is also a member of an Additional Group it doesn't work. I don't want to give the additional groups the same permission as group 11 as one of them is a group that anyone can join, so is there a way to make it work for group 11 when they are also a member of an additional group?

Thank You.
Reply
#19
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-13, 09:59 AM)sarisisop Wrote: If a member of Group 11 is also a member of an Additional Group it doesn't work. I don't want to give the additional groups the same permission as group 11 as one of them is a group that anyone can join.

When a member of group 11 is also member of other group(s), this does not mean that the members of those other groups get the permissions of group 11. So I think there is nothing wrong. Only members of group 11 and members that can access the ModCP pass the filter in post 16.

Otherwise, I do not understand you, I fear.
Regards, Ad Bakker (NL)
Reply
#20
Solved: 9 Years, 4 Months, 4 Weeks ago
(2015-07-13, 10:07 AM)Ad Bakker Wrote:
(2015-07-13, 09:59 AM)sarisisop Wrote: If a member of Group 11 is also a member of an Additional Group it doesn't work. I don't want to give the additional groups the same permission as group 11 as one of them is a group that anyone can join.

When a member of group 11 is also member of other group(s), this does not mean that the members of those other groups get the permissions of group 11. So I think there is nothing wrong. Only members of group 11 and members that can access the ModCP pass the filter in post 16.

Otherwise, I do not understand you, I fear.

Sorry I may not of explained very well.

If a member is in group 11 it works fine, but if they are also in an additional group say (Newsletter group 15) it no longer works.

So if they are in Primary Group (11) it's fine, but if they are in (11) and (Additional Group 15) it doesn't work.

Ad it's no big deal if it can't be done, the Email/Pm thing you are working on will do the job.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)