MyBB Community Forums

Full Version: View private shouts in MyShoutbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)


my owner group id is 9

that code is correct

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 9)
(2012-10-20, 05:05 AM)$*ch~irfan*$ Wrote: [ -> ]if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)


my owner group id is 9

that code is correct

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 9)

No. Basically, what the added bit of what first code is saying is "If this group can access the ACP, then do this". It's pretty much binary/boolean (for want of a better explanation) - 1 is true, 0 is false.

TL;DR the code on top is correct.
admin/index.php?module=user-groups&action=edit&gid=9 now what is correct code ?
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)

Probably correct.

 if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 9)

No correct.
plz tell me what is correct code
(2012-10-23, 11:44 PM)$*ch~irfan*$ Wrote: [ -> ]plz tell me what is correct code

We've told you a couple of times. Smile

(2012-10-21, 02:33 AM)Omar G. Wrote: [ -> ]
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)

Probably correct.

 if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 9)

No correct.
He wants it just for usergroup with gid 9, not every which can access ACP.

That would be like this if I'm not mistaken:
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->user['usergroup'] == '9')
That will only work for primary groups, just a FYI.
thanx u soo much
Pages: 1 2