MyBB Community Forums

Full Version: What is the difference between usergroup "cancp" and "1"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What is the difference between

$mybb->usergroup['cancp'] == 1

and

$mybb->user['usergroup'] == 1
If 'cancp' is 1 then users of this group can access the admin CP.

If the 'usergroup' is 1 they're in the group with ID 1, guests unless you've changed something.
(2011-11-05, 02:46 PM)AJS Wrote: [ -> ]If 'cancp' is 1 then users of this group can access the admin CP.

Which group? cancp ? or 1 ?
is cancp == 1 means if cancp = true

group IDs in general are :
1 → Guests
2 → Registered
3 → Super Moderators
4 → Administrators
5 → Awaiting Activation
6 → Moderators
7 → Banned

( see also : Re: what are group id )
I suppose, if you use $mybb->usergroup['cancp'] means everybody who have access to the ACP from your groups settings, whereas $mybb->user['usergroup'] defines a group without taking into consideration any setting for that group.

I may be wrong..
^ cancp is a confusing term !! if I am not mistaken, it is for checking access to admin panel ...
(2011-11-05, 04:20 PM)ranjani Wrote: [ -> ]^ cancp is a confusing term !! if I am not mistaken, it is for checking access to admin panel ...

Yes, almost the same explanation :p
$mybb->user['usergroup'] is some number that is the primary usergroup of the user

$mybb->user['additionalgroups'] is a CSV list of the other groups the user is part of

$mybb->usergroup['something_here'] is the internal MyBB variable that contains the "yes wins" permissions for the current user given all the groups that the user is a member of, both primary and additional
cancp means those users who have access to ACP ? Can it be done, i.e. A moderator have access to ACP ?
^ cancp => access to admin control panel

in edit group settings, each group can be set with below options by admin

Moderation/Administration Options
Yes, users of this group are super moderators
Yes, users of this group can access the moderator CP
Yes, users of this group can access the admin CP


if required , all members of a specific group can have access to admin panel !!

Pages: 1 2