2017-01-15, 07:12 PM
I know you can do $mybb->user['cancp'] to see if is a user is an admin, but is there anything equivalent for forum moderators?
Is there an equivalent to cancp for moderators?
|
2017-01-15, 07:12 PM
I know you can do $mybb->user['cancp'] to see if is a user is an admin, but is there anything equivalent for forum moderators?
2017-01-15, 07:26 PM
is_moderator(), or is_moderator($fid) to check a specific forum.
2017-01-15, 08:41 PM
2017-01-15, 08:46 PM
==> http://phpcrossref.com/xref/mybb/inc/fun...html#l1527
Example:
2017-01-15, 08:49 PM
(2017-01-15, 08:46 PM)SvePu Wrote: ==> http://phpcrossref.com/xref/mybb/inc/fun...html#l1527 Thank you! I was looking in user functions.
2017-01-16, 11:51 AM
(2017-01-15, 07:12 PM)ConnerKid Wrote: I know you can do $mybb->user['cancp'] to see if is a user is an admin, but is there anything equivalent for forum moderators? In your example it should be $mybb->usergroup['cancp']. Anytime you want to check if a user has a certain permission you use $mybb->usergroup['permission_name']. |
« Next Oldest | Next Newest »
|