API17:JUserHelper::setUserGroups
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JUserHelper::setUserGroups
Description
Method to set the groups for a user.
Description:JUserHelper::setUserGroups [Edit Descripton]
Since
Synopsis
public static JUserHelper::setUserGroups ($userId, $groups)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $userId | integer | The id of the user. | |
| $groups | array | An array of group ids to put the user in. |
Returns
mixed Boolean true on success, on error.
Defined in
libraries/joomla/user/helper.php
Referenced by
See also
SeeAlso:JUserHelper::setUserGroups
Examples
<CodeExamplesForm />
