General Introduction
Settings
Add
Authorize
CanDoFileOperation
ChangePassword
Delete
GetByID
GetByLogin
GetCount
GetEmail
GetExternalAuthList
GetFirstName
GetFullName
GetID
GetLastName
GetList
GetLogin
GetParam
GetPasswordHash
GetUserGroup
GetUserGroupArray
GetUserGroupList
GetUserGroupString
IsAdmin
IsAuthorized
IsOnLine
Login
LoginByHash
Logout
Register
SavePasswordHash
SendPassword
SendUserInfo
SetLastActivityDate
SetParam
SetUserGroup
SetUserGroupArray
SimpleRegister
Update
Complex logic in filter
Special variables
Special constants
GetUserGroupString
string CUser::GetUserGroupString()
The method returns a string with comma-separated ID's of all groups containing the current authorized user (usually called from the $USER object). The data is retrieved from the session variable, which value corresponds to the user assignment at the moment of authorization. If the user is not authorized, "all users" group ID will be returned. Non-static method.
Parameters
No parameters.See Also
Examples of use
<? // obtain an array of groups for current user global $USER; $strGroups = $USER->GetUserGroupString(); echo $strGroups; // "1,2,3" ?>
© «Bitrix24», 2001-2023
Up