CUser::SetUserGroup( int user_id, array groups );
The method SetUserGroup assigns a user to a number of groups. The assignment is stored in the database but does not affect the already authorized user state.
Parameter | Description |
---|---|
user_id | User ID. |
groups | Array containing the ID's of the user groups. |
<? // assign a user ID=10 to a group with ID=5 $arGroups = CUser::GetUserGroup(10); $arGroups[] = 5; CUser::SetUserGroup(10, $arGroups); ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |