View private shouts in MyShoutbox
#11
This user has been denied support. This user has been denied support.
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)
Reply
#12
(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.
Please don't PM me for support. Smile
Reply
#13
This user has been denied support. This user has been denied support.
admin/index.php?module=user-groups&action=edit&gid=9 now what is correct code ?
Reply
#14
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)
Please don't PM me for support. Smile
Reply
#15
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.
Reply
#16
This user has been denied support. This user has been denied support.
plz tell me what is correct code
Reply
#17
(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.
Please don't PM me for support. Smile
Reply
#18
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')
Reply
#19
That will only work for primary groups, just a FYI.
Reply
#20
This user has been denied support. This user has been denied support.
thanx u soo much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)