Ejemplo n.º 1
0
function ossn_get_user_groups($user)
{
    if ($user) {
        $groups = new OssnGroup();
        return $groups->getUserGroups($user->guid);
    }
}
Ejemplo n.º 2
0
/**
 * Group delete callback
 *
 * @param string $callback Callback name
 * @param string $type Callback type
 * @param array Callback data
 *
 * @return void;
 * @access private
 */
function ossn_user_groups_delete($callback, $type, $params)
{
    $deleteGroup = new OssnGroup();
    $groups = $deleteGroup->getUserGroups($params['entity']->guid);
    if ($groups) {
        foreach ($groups as $group) {
            $deleteGroup->deleteGroup($group->guid);
        }
    }
}