Horde_Group_Base::addUser PHP Method

addUser() public method

Add a user to a group.
public addUser ( mixed $gid, string $user )
$gid mixed A group ID.
$user string A user name.
    public function addUser($gid, $user)
    {
        $this->_addUser($gid, $user);
        // Update users cache.
        $sig = $this->_sig('users_' . $gid);
        try {
            if ($users = $this->_cache->get($sig, 0)) {
                $users = @unserialize($users);
                $users[] = $user;
                $this->_cache->set($sig, serialize($users));
            }
        } catch (Horde_Cache_Exception $e) {
        }
    }