33 include_once
'./webservice/soap/classes/class.ilSoapAdministration.php';
39 parent::ilSoapAdministration();
44 function login(
$client,$username,$password)
52 $_POST[
'username'] = $username;
53 $_POST[
'password'] = $password;
58 include_once
'./include/inc.header.php';
67 if($ilUser->hasToAcceptTermsOfService())
69 return $this->
__raiseError(
'User agreement not accepted',
'Server');
72 return (session_id().
'::'.
$client);
79 $this->sauth->setClient(
$client);
80 $this->sauth->setUsername($username);
81 $this->sauth->setPT($PT);
82 $authenticated =
true;
85 if(!$this->sauth->authenticate())
87 $authenticated =
false;
91 return $this->
__raiseError($this->sauth->getMessage(),$this->sauth->getMessageCode());
93 return $this->sauth->getSid().
'::'.
$client;
99 return $this->login(
$client, $username, $password);
117 if(!$this->__checkSession($sid))
122 if (!$ilIliasIniFile->readVariable(
'server',
'studip'))
124 return $this->
__raiseError(
'Stud.IP mode not active.',
'Server');
127 if(!$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
129 return $this->
__raiseError(
'No permission to initialize user session.',
'Server');
132 if($ilUser->getLoginByUserId($user_id))
142 $_POST[
'username'] = $tmp_user->getLogin();
143 $_POST[
'password'] = $tmp_user->getPasswd();
147 require_once(
"Services/Init/classes/class.ilInitialisation.php");
158 if($ilUser->hasToAcceptTermsOfService())
160 return $this->
__raiseError(
'User agreement not accepted',
'Server');
163 return (session_id().
'::'.
$client);
165 return $this->
__raiseError(
'User does not exist',
'Client');
173 if(!$this->__checkSession($sid))
198 if(!$this->__checkSession($sid))
203 $user_name = trim($user_name);
205 if(!strlen($user_name))
207 return $this->
__raiseError(
'No username given. Aborting',
'Client');
212 if(strcasecmp($ilUser->getLogin(), $user_name) != 0 && !$rbacsystem->checkAccess(
'read',
USER_FOLDER_ID))
220 return $user_id ? $user_id :
"0";
229 if(!$this->__checkSession($sid))
238 return $this->
__raiseError(
'Check access failed.',
'Server');
241 if($ilUser->getLoginByUserId($user_id))
248 return $this->
__raiseError(
'User does not exist',
'Client');
254 function updateUser($sid,$user_data)
262 if(!$this->__checkSession($sid))
271 return $this->
__raiseError(
'Check access failed.',
'Server');
276 return $this->
__raiseError(
'User with id '.$user_data[
'usr_id'].
' does not exist.',
'Client');
287 if(strlen($user_data[
'passwd']) != 32)
297 $log->write(
'SOAP: updateUser()');
300 if($user_data[
'accepted_agreement'] && $user_obj->hasToAcceptTermsOfService())
302 $user_obj->writeAccepted();
316 if(!$this->__checkSession($sid))
325 return $this->
__raiseError(
'Check access failed.',
'Server');
330 return $this->
__raiseError(
'No valid user_id given.',
'Client');
333 $tmp_user->replacePassword($new_password);
341 function addUser($sid,$user_data,$global_role_id)
346 if(!$this->__checkSession($sid))
355 return $this->
__raiseError(
'Check access failed.',
'Server');
366 return $this->
__raiseError(
'No role id given',
'Client');
371 $global_roles = $rbacreview->getGlobalRoles();
373 if(!in_array($global_role_id,$global_roles))
375 return $this->
__raiseError(
'Role with id: '.$global_role_id.
' is not a valid global role',
'Client');
380 if(strlen($user_data[
'passwd']) != 32)
390 $ilLog->write(
'SOAP: addUser()');
396 if ($user_data[
"import_id"] !=
"")
398 $new_user->setImportId($user_data[
"import_id"]);
407 if($user_data[
'accepted_agreement'])
413 $rbacadmin->assignUser($global_role_id,
$new_user->getId());
416 $new_user->setLanguage($user_data[
'user_language']);
417 $new_user->setPref(
'style',$user_data[
'user_style']);
418 $new_user->setPref(
'skin',$user_data[
'user_skin']);
419 $new_user->setPref(
'hits_per_page',$ilSetting->get(
'hits_per_page'));
420 $new_user->setPref(
'show_users_online',$ilSetting->get(
'show_users_online'));
434 if(!$this->__checkSession($sid))
441 return $this->
__raiseError(
'No user_id given. Aborting',
'Client');
448 return $this->
__raiseError(
'Check access failed.',
'Server');
451 if(!$ilUser->getLoginByUserId($user_id))
453 return $this->
__raiseError(
'User id: '.$user_id.
' is not a valid identifier. Aborting',
'Client');
455 if($ilUser->getId() == $user_id)
457 return $this->
__raiseError(
'Cannot delete myself. Aborting',
'Client');
459 if($user_id == SYSTEM_USER_ID)
461 return $this->
__raiseError(
'Cannot delete root account. Aborting',
'Client');
464 $log->write(
'SOAP: deleteUser()');
466 $delete_user->delete();
481 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
487 if(!isset($user_data[
'login']))
491 if(!isset($user_data[
'passwd']) and !$allow_empty_password)
495 if(!isset($user_data[
'email']))
499 if(!isset($user_data[
'user_language']))
501 $user_data[
'user_language'] = $lng->getDefaultLanguage();
504 foreach($user_data as $field => $value)
525 if(!strlen($value) and $allow_empty_password)
542 case 'time_limit_unlimited':
545 if($user_data[
'time_limit_from'] >= $user_data[
'time_limit_until'])
552 case 'user_language':
553 $lang_inst = $lng->getInstalledLanguages();
555 if(!in_array($user_data[
'user_language'],$lang_inst))
557 $this->
__appendMessage(
'Language: '.$user_data[
'user_language'].
' is not installed');
564 if(($user_data[
'user_skin'] and !$user_data[
'user_style']) or
565 (!$user_data[
'user_skin'] and $user_data[
'user_style']))
569 elseif($user_data[
'user_skin'] and $user_data[
'user_style'])
572 $templates = $styleDefinition->getAllTemplates();
573 if (count($templates) > 0 && is_array($templates))
575 foreach($templates as $template)
578 $styleDef->startParsing();
579 $styles = $styleDef->getStyles();
580 foreach ($styles as
$style)
582 if ($user_data[
'user_skin'] == $template[
"id"] &&
583 $user_data[
'user_style'] == $style[
"id"])
597 case 'time_limit_owner':
599 if($type !=
'cat' and $type !=
'usrf')
601 $this->
__appendMessage(
'time_limit_owner must be ref_id of category or user folder'.$type);
617 if(!$user_data[
'time_limit_from'] and
618 !$user_data[
'time_limit_until'] and
619 !$user_data[
'time_limit_unlimited'])
621 $user_data[
'time_limit_unlimited'] = 1;
623 if(!$user_data[
'time_limit_owner'])
630 $user_data[
'im_icq'] = $user_obj->getInstantMessengerId(
'icq');
631 $user_data[
'im_yahoo'] = $user_obj->getInstantMessengerId(
'yahoo');
632 $user_data[
'im_msn'] = $user_obj->getInstantMessengerId(
'msn');
633 $user_data[
'im_aim'] = $user_obj->getInstantMessengerId(
'aim');
634 $user_data[
'im_skype'] = $user_obj->getInstantMessengerId(
'skype');
635 $user_data[
'im_jabber'] = $user_obj->getInstantMessengerId(
'jabber');
636 $user_data[
'im_voip'] = $user_obj->getInstantMessengerId(
'voip');
638 $user_data[
'delicious'] = $user_obj->getDelicious();
639 $user_data[
'latitude'] = $user_obj->getLatitude();
640 $user_data[
'longitude'] = $user_obj->getLongitude();
641 $user_data[
'loc_zoom'] = $user_obj->getLocationZoom();
644 $user_data[
'auth_mode'] = $user_obj->getAuthMode();
645 $user_data[
'ext_account'] = $user_obj->getExternalAccount();
646 $user_obj->assignData($user_data);
648 if(isset($user_data[
'user_language']))
650 $user_obj->setLanguage($user_data[
'user_language']);
652 if(isset($user_data[
'user_skin']) and isset($user_data[
'user_style']))
654 $user_obj->setPref(
'skin',$user_data[
'user_skin']);
655 $user_obj->setPref(
'style',$user_data[
'user_style']);
662 $usr_data[
'usr_id'] = $usr_obj->getId();
663 $usr_data[
'login'] = $usr_obj->getLogin();
664 $usr_data[
'passwd'] = $usr_obj->getPasswd();
665 $usr_data[
'passwd_type'] = $usr_obj->getPasswdType();
666 $usr_data[
'firstname'] = $usr_obj->getFirstname();
667 $usr_data[
'lastname'] = $usr_obj->getLastname();
668 $usr_data[
'title'] = $usr_obj->getUTitle();
669 $usr_data[
'gender'] = $usr_obj->getGender();
670 $usr_data[
'email'] = $usr_obj->getEmail();
671 $usr_data[
'institution'] = $usr_obj->getInstitution();
672 $usr_data[
'street'] = $usr_obj->getStreet();
673 $usr_data[
'city'] = $usr_obj->getCity();
674 $usr_data[
'zipcode'] = $usr_obj->getZipcode();
675 $usr_data[
'country'] = $usr_obj->getCountry();
676 $usr_data[
'phone_office'] = $usr_obj->getPhoneOffice();
677 $usr_data[
'last_login'] = $usr_obj->getLastLogin();
678 $usr_data[
'last_update'] = $usr_obj->getLastUpdate();
679 $usr_data[
'create_date'] = $usr_obj->getCreateDate();
680 $usr_data[
'hobby'] = $usr_obj->getHobby();
681 $usr_data[
'department'] = $usr_obj->getDepartment();
682 $usr_data[
'phone_home'] = $usr_obj->getPhoneHome();
683 $usr_data[
'phone_mobile'] = $usr_obj->getPhoneMobile();
684 $usr_data[
'fax'] = $usr_obj->getFax();
685 $usr_data[
'time_limit_owner'] = $usr_obj->getTimeLimitOwner();
686 $usr_data[
'time_limit_unlimited'] = $usr_obj->getTimeLimitUnlimited();
687 $usr_data[
'time_limit_from'] = $usr_obj->getTimeLimitFrom();
688 $usr_data[
'time_limit_until'] = $usr_obj->getTimeLimitUntil();
689 $usr_data[
'time_limit_message'] = $usr_obj->getTimeLimitMessage();
690 $usr_data[
'referral_comment'] = $usr_obj->getComment();
691 $usr_data[
'matriculation'] = $usr_obj->getMatriculation();
692 $usr_data[
'active'] = $usr_obj->getActive();
693 $usr_data[
'approve_date'] = $usr_obj->getApproveDate();
694 $usr_data[
'user_skin'] = $usr_obj->getPref(
'skin');
695 $usr_data[
'user_style'] = $usr_obj->getPref(
'style');
696 $usr_data[
'user_language'] = $usr_obj->getLanguage();
697 $usr_data[
'auth_mode'] = $usr_obj->getAuthMode();
698 $usr_data[
'accepted_agreement'] = !$usr_obj->hasToAcceptTermsOfService();
699 $usr_data[
'import_id'] = $usr_obj->getImportId();
706 foreach($user_new as $key => $value)
708 $user_old[$key] = $value;
710 return $user_old ? $user_old : array();
719 function importUsers ($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
724 if(!$this->__checkSession($sid))
730 include_once
'./Services/User/classes/class.ilUserImportParser.php';
731 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
732 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
744 if (is_array($error))
746 foreach ($error as $err) {
747 $msg []=
"(".$err[
"line"].
",".$err[
"col"].
"): ".$err[
"errormessage"];
754 $msg = join(
"\n",$msg);
759 switch ($conflict_rule)
777 if ($folder_id == -1)
784 return $this->
__raiseError(
'Wrong reference id.',
'Server');
787 if ($import_folder->getType() !=
"usrf" && $import_folder->getType() !=
"cat")
788 return $this->
__raiseError(
'Folder must be a usr folder or a category.',
'Server');
791 if(!$rbacsystem->checkAccess(
'create_usr',$folder_id))
793 return $this->
__raiseError(
'Missing permission for creating users within '.$import_folder->getTitle(),
'Server');
802 $importParser->setXMLContent($usr_xml);
803 $importParser->startParsing();
805 switch ($importParser->getErrorLevel())
819 $importParser->setXMLContent($usr_xml);
821 $importParser->startParsing();
823 $roles = $importParser->getCollectedRoles();
830 $permitted_roles = array();
831 foreach ($roles as $role_id => $role)
833 if (!is_numeric ($role_id))
838 if (is_numeric($internalId))
840 $role_id = $internalId;
841 $role_name = $role_id;
853 $permitted_roles[$role_id] = $role_id;
858 return $this->
__raiseError(
"Could not find role ".$role_name.
". Either you use an invalid/deleted role ".
859 "or you try to assign a local role into the non-standard user folder and this role is not in its subtree.",
'Server');
863 $global_roles = $rbacreview->getGlobalRoles();
869 foreach ($permitted_roles as $role_id => $role_name)
873 if (in_array($role_id, $global_roles))
875 if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId()))
879 return $this->
__raiseError($lng->txt(
"usrimport_with_specified_role_not_permitted").
" $role_name ($role_id)",
'Server');
884 $rolf = $rbacreview->getFoldersAssignedToRole($role_id,
true);
885 if ($rbacreview->isDeleted($rolf[0])
886 || ! $rbacsystem->checkAccess(
'write',$rolf[0]))
889 return $this->
__raiseError($lng->txt(
"usrimport_with_specified_role_not_permitted").
" $role_name ($role_id)",
"Server");
898 $importParser->setSendMail($send_account_mail);
900 $importParser->setFolderId($folder_id);
901 $importParser->setXMLContent($usr_xml);
903 $importParser->setRoleAssignment($permitted_roles);
905 $importParser->startParsing();
924 static $checked_roles = array();
925 static $global_roles = null;
928 if(isset($checked_roles[$a_role]))
930 return $checked_roles[$a_role];
935 $locations = $rbacreview->getFoldersAssignedToRole($a_role,
true);
941 $ilLog->write(__METHOD__.
': Check global role');
947 $ilLog->write(__METHOD__.
': '.$a_folder);
948 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
951 $ilLog->write(__METHOD__.
': No assignment allowed');
952 $checked_roles[$a_role] =
false;
957 if ($a_role == ANONYMOUS_ROLE_ID)
959 $ilLog->write(__METHOD__.
': Anonymous role chosen.');
960 $checked_roles[$a_role] =
false;
964 if($a_role == SYSTEM_ROLE_ID and !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
966 $ilLog->write(__METHOD__.
': System role assignment forbidden.');
967 $checked_roles[$a_role] =
false;
972 $ilLog->write(__METHOD__.
': Assignment allowed.');
973 $checked_roles[$a_role] =
true;
978 $ilLog->write(__METHOD__.
': Check local role.');
981 $rolfs = $rbacreview->getFoldersAssignedToRole($a_role,
true);
989 if($rbacreview->isDeleted($rolf)
990 || !$rbacsystem->checkAccess(
'edit_permission',$rolf))
992 $ilLog->write(__METHOD__.
': Role deleted or no permission.');
993 $checked_roles[$a_role] =
false;
1004 if($a_folder !=
USER_FOLDER_ID and $a_folder != 0 and !$tree->isGrandChild($a_folder,$rolf))
1006 $ilLog->write(__METHOD__.
': Not in path of category.');
1007 $checked_roles[$a_role] =
false;
1010 $ilLog->write(__METHOD__.
': Assignment allowed.');
1011 $checked_roles[$a_role] =
true;
1025 if(!$this->__checkSession($sid))
1030 global
$ilDB, $tree, $rbacreview, $rbacsystem;
1040 switch ($object->getType()) {
1050 $roles = $object->__getLocalRoles();
1052 foreach($roles as $role_id)
1054 $data = array_merge($rbacreview->assignedUsers($role_id, array()),
$data);
1060 $member_ids = $object->getGroupMemberIds();
1064 $course_ref_id = $tree->checkForParentType(
$ref_id,
'crs');
1067 return $this->
__raiseError(
"No course for session",
"Client");
1071 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1073 $member_ids = array_keys($event_part->getParticipants());
1078 if (is_array(
$data))
1080 include_once
'./Services/User/classes/class.ilUserXMLWriter.php';
1083 $xmlWriter->setObjects(
$data);
1084 $xmlWriter->setAttachRoles ($attachRoles);
1086 if($xmlWriter->start())
1088 return $xmlWriter->getXML();
1091 return $this->
__raiseError(
'Error in processing information. This is likely a bug.',
'Server');
1103 if(!$this->__checkSession($sid))
1108 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
1112 $global_roles = $rbacreview->getGlobalRoles();
1115 if (in_array($role_id, $global_roles))
1117 if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))
1120 return $this->
__raiseError(
"Role access not permitted. ($role_id)",
"Server");
1125 $rolf = $rbacreview->getFoldersAssignedToRole($role_id,
true);
1126 if ($rbacreview->isDeleted($rolf[0])
1127 || ! $rbacsystem->checkAccess(
'write',$rolf[0]))
1129 return $this->
__raiseError(
"Role access not permitted. ($role_id)",
"Server");
1131 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1133 if(!$rbacsystem->checkAccess(
'read',SYSTEM_USER_ID) and
1134 !$rbacsystem->checkAccess(
'export_member_data',$privacy->getPrivacySettingsRefId())) {
1135 return $this->
__raiseError(
"Export of local role members not permitted. ($role_id)",
"Server");
1142 include_once
'./Services/User/classes/class.ilUserXMLWriter.php';
1145 $xmlWriter->setAttachRoles($attachRoles);
1147 $xmlWriter->setObjects(
$data);
1149 if($xmlWriter->start())
1151 return $xmlWriter->getXML();
1153 return $this->
__raiseError(
'Error in getUsersForRole',
'Server');
1164 include_once
'./webservice/soap/classes/class.ilXMLResultSet.php';
1165 include_once
'./webservice/soap/classes/class.ilXMLResultSetWriter.php';
1168 $xmlResultSet->addColumn (
"userid");
1169 $xmlResultSet->addColumn (
"login");
1170 $xmlResultSet->addColumn (
"action");
1171 $xmlResultSet->addColumn (
"message");
1173 foreach ($a_array as $username =>
$messages)
1179 $xmlRow->setValue (0, 0);
1180 $xmlRow->setValue (1, $username);
1181 $xmlRow->setValue (2,
"");
1182 $xmlRow->setValue (3, $message);
1184 $xmlResultSet->addRow ($xmlRow);
1190 if ($xml_writer->start ())
1191 return $xml_writer->getXML();
1193 return $this->
__raiseError(
'Error in __getImportProtocolAsXML',
'Server');
1204 include_once
'./webservice/soap/classes/class.ilXMLResultSet.php';
1205 include_once
'./webservice/soap/classes/class.ilXMLResultSetWriter.php';
1208 $xmlResultSet->addColumn (
"userid");
1209 $xmlResultSet->addColumn (
"login");
1210 $xmlResultSet->addColumn (
"action");
1211 $xmlResultSet->addColumn (
"message");
1213 if (count($a_array))
1214 foreach ($a_array as $username => $message)
1217 $xmlRow->setValue (0, $username);
1218 $xmlRow->setValue (1, $message[
"login"]);
1219 $xmlRow->setValue (2, $message[
"action"]);
1220 $xmlRow->setValue (3, $message[
"message"]);
1222 $xmlResultSet->addRow ($xmlRow);
1227 if ($xml_writer->start ())
1228 return $xml_writer->getXML();
1230 return $this->
__raiseError(
'Error in __getUserMappingAsXML',
'Server');
1242 function searchUser ($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active) {
1247 if(!$this->__checkSession($sid))
1252 global
$ilDB, $rbacsystem;
1256 return $this->
__raiseError(
'Check access failed.',
'Server');
1260 if (!count($a_keyfields))
1261 $this->
__raiseError(
'At least one keyfield is needed',
'Client');
1263 if (!count ($a_keyvalues))
1264 $this->
__raiseError(
'At least one keyvalue is needed',
'Client');
1266 if (!strcasecmp($query_operator,
"and")==0 || !strcasecmp($query_operator,
"or") == 0)
1267 $this->
__raiseError(
'Query operator must be either \'and\' or \'or\'',
'Client');
1272 $query =
"SELECT usr_data.*, usr_pref.value AS language 1275 ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = ".
1276 $ilDB->quote(
"language",
"text").
1278 WHERE 1 = 1 ".$query;
1280 if (is_numeric($active) && $active > -1)
1281 $query .=
" AND active = ". $ilDB->quote($active);
1283 $query .=
" ORDER BY usr_data.lastname, usr_data.firstname ";
1291 while(
$row = $ilDB->fetchAssoc(
$r))
1296 include_once
'./Services/User/classes/class.ilUserXMLWriter.php';
1299 $xmlWriter->setAttachRoles($attach_roles);
1301 $xmlWriter->setObjects(
$data);
1303 if($xmlWriter->start())
1305 return $xmlWriter->getXML();
1307 return $this->
__raiseError(
'Error in searchUser',
'Server');
1322 $allowed_fields = array (
"firstname",
"lastname",
"email",
"login",
"matriculation",
"institution",
"department",
"title",
"ext_account");
1324 foreach ($a_keyfields as $keyfield)
1326 $keyfield = strtolower($keyfield);
1328 if (!in_array($keyfield, $allowed_fields))
1331 $field_query = array ();
1332 foreach ($a_keyvalues as $keyvalue)
1334 if (strlen($keyvalue) >= 3) {
1335 $field_query []= $keyfield.
" like '%".$keyvalue.
"%'";
1339 if (count($field_query))
1340 $query [] = join(
" ".strtoupper($queryOperator).
" ", $field_query);
1344 return count (
$query) ?
" AND ((". join(
") OR (",
$query) .
"))" :
"AND 0";
1360 if(!$this->__checkSession($sid))
1369 if(is_array($a_user_ids) and count($a_user_ids) == 1)
1371 if(end($a_user_ids) == $ilUser->getId())
1376 elseif(is_numeric($a_user_ids))
1378 if($a_user_ids == $ilUser->getId())
1384 if(!$rbacsystem->checkAccess(
'read',
USER_FOLDER_ID) and !$is_self)
1386 return $this->
__raiseError(
'Check access failed.',
'Server');
1393 include_once
'./Services/User/classes/class.ilUserXMLWriter.php';
1395 $xmlWriter->setAttachRoles($attach_roles);
1396 $xmlWriter->setObjects(
$data);
1398 if($xmlWriter->start())
1400 return $xmlWriter->getXML();
1403 return $this->
__raiseError(
'User does not exist',
'Client');
1413 if(!$this->__checkSession($sid))
1420 include_once
'Services/Mail/classes/class.ilMailGlobalServices.php';
1436 if(!$this->__checkSession($sid))
1443 $parts = explode(
'::', $sid);
1444 $query =
"SELECT usr_id FROM usr_session " 1445 .
"INNER JOIN usr_data ON usr_id = user_id WHERE session_id = %s";
1446 $res = $ilDB->queryF(
$query, array(
'text'), array($parts[0]));
1449 if(!(
int)
$data[
'usr_id'])
1454 return (
int)$data[
'usr_id'];
XML Writer for XMLResultSet.
__validateUserData(&$user_data, $check_complete=true)
domxml_open_mem($str, $mode=DOMXML_LOAD_PARSING, &$error=NULL)
__buildSearchQuery($a_keyfields, $queryOperator, $a_keyvalues)
create search term according to parameters
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
checkObjectAccess($ref_id, $expected_type, $permission, $returnObject=false)
check access for ref id: expected type, permission, return object instance if returnobject is true ...
searchUser($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active)
return user xml following dtd 3.7
addUser($sid, $user_data, $global_role_id)
loginCAS($client, $PT, $username)
updatePassword($sid, $user_id, $new_password)
static is_email($a_email)
This preg-based function checks whether an e-mail address is formally valid.
static _lookupTitle($a_id)
lookup object title
const IL_FAIL_ON_CONFLICT
__initAuthenticationObject($a_auth_mode=AUTH_LOCAL)
getUserXML($sid, $a_user_ids, $attach_roles)
return user xmls for given user ids (csv separated ids) as xml based on usr dtd.
__readUserData(&$usr_obj)
static _needsExternalAccountByAuthMode($a_auth_mode)
Check if chosen auth mode needs an external account entry.
static isPassword($a_passwd, &$customError=null)
validates a password public
isPermittedRole($a_folder, $a_role)
check if assignment is allowed
getUserForRole($sid, $role_id, $attachRoles, $active)
getUserIdByLogin($a_login)
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
deleteUser($sid, $user_id)
static setCookie($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
const DOMXML_LOAD_VALIDATING
__getImportProtocolAsXML($a_array)
Create XML ResultSet.
loginLDAP($client, $username, $password)
loginStudipUser($sid, $user_id)
login as user for studip mode
static _lookupObjId($a_id)
__raiseError($a_message, $a_code)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
_getAuthMode($a_auth_mode, $a_db_handler='')
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getUsersForFolder($ref_id, $active)
get users for a category or from system folder
static _getUsersForGroup($a_mem_ids, $active=-1)
return user data for group members
getUsersForContainer($sid, $ref_id, $attachRoles, $active)
return list of users following dtd users_3_7
_getAssignUsersStatus($a_role_id)
importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail)
define ("IL_FAIL_ON_CONFLICT", 1); define ("IL_UPDATE_ON_CONFLICT", 2); define ("IL_IGNORE_ON_CONFLIC...
parses the template.xml that defines all styles of the current template
static _getUsersForIds($a_mem_ids, $active=-1, $timelimitowner=-1)
return user data for given user id
const USER_FOLDER_ID
Class ilObjUserFolder.
static getNumberOfNewMailsByUserId($usr_id)
Determines the number of new mails for the passed user id and stores this information in a local cach...
static _getInstance()
Get instance of ilPrivacySettings.
static _getUsersForRole($role_id, $active=-1)
return array of complete users which belong to a specific role
ilSoapUserAdministration()
__setUserData(&$user_obj, &$user_data)
lookupUser($sid, $user_name)
static __extractId($ilias_id, $inst_id)
extract ref id from role title, e.g.
static _getUserData($a_internalids)
return user data for given user ids
__getUserMappingAsXML($a_array)
return user mapping as xml
__substituteUserData($user_old, $user_new)
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT