API17

API17:JUserHelper::setUserGroups

From Joomla! Documentation

Joomla 11.1 JUserHelper::setUserGroups

Description

Method to set the groups for a user.


public static function 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 on line 146 of libraries/joomla/user/helper.php
  • Since Joomla 11.1

See also


User contributed notes

Code Examples