Exemplo n.º 1
0
function &getGroupsByName($session_ser, $group_names)
{
    session_continue($session_ser);
    $grps =& group_get_objects_by_name($group_names);
    if (!$grps) {
        return new soap_fault('2002', 'group', 'Could Not Get Groups by Name', 'Could Not Get Groups by Name');
    }
    return groups_to_soap($grps);
}
Exemplo n.º 2
0
function &userGetGroups($session_ser, $user_id)
{
    continue_session($session_ser);
    $user =& user_get_object($user_id);
    if (!$user) {
        return new soap_fault('3003', 'user', 'Could Not Get Users Groups', 'Could Not Get Users Groups');
    }
    return groups_to_soap($user->getGroups());
}
Exemplo n.º 3
0
 /**
  * getMyProjects : returns the array of SOAPGroup the current user is member of
  *
  * @param string $sessionKey the session hash associated with the session opened by the person who calls the service
  * @return array the array of SOAPGroup th ecurrent user ismember of
  */
 function getMyProjects($sessionKey)
 {
     if (session_continue($sessionKey)) {
         $gf = new GroupFactory();
         $my_groups = $gf->getMyGroups();
         return groups_to_soap($my_groups);
     } else {
         return new SoapFault(invalid_session_fault, 'Invalid Session ', 'getMyProjects');
     }
 }