4 define (
"IL_PASSWD_PLAIN",
"plain");
5 define (
"IL_PASSWD_MD5",
"md5");
6 define (
"IL_PASSWD_CRYPT",
"crypt");
9 require_once
"classes/class.ilObject.php";
10 require_once
'Services/User/exceptions/class.ilUserException.php';
138 function ilObjUser($a_user_id = 0, $a_call_by_reference =
false)
147 $this->
ilObject($a_user_id, $a_call_by_reference);
148 $this->auth_mode =
"default";
158 $this->
setId($a_user_id);
165 $this->prefs = array();
167 $this->prefs[
"language"] = $this->ilias->ini->readVariable(
"language",
"default");
170 $this->skin = $this->ilias->ini->readVariable(
"layout",
"skin");
173 $this->prefs[
"show_users_online"] =
"y";
176 $this->prefs[
"style"] = $this->ilias->ini->readVariable(
"layout",
"style");
193 $r = $ilDB->queryF(
"SELECT * FROM usr_data ".
194 "WHERE usr_id= %s", array(
"integer"), array($this->
id));
196 if (
$data = $ilDB->fetchAssoc($r))
200 if (
$data[
"passwd"] ==
"" &&
$data[
"i2passwd"] !=
"")
210 unset(
$data[
"i2passw"]);
226 if ($this->prefs[
"language"] ==
"")
228 $this->prefs[
"language"] = $this->oldPrefs[
"language"];
232 include_once(
"./Services/Style/classes/class.ilStyleDefinition.php");
233 if ($this->prefs[
"skin"] ==
"" ||
236 $this->prefs[
"skin"] = $this->oldPrefs[
"skin"];
239 $this->skin = $this->prefs[
"skin"];
242 if ($this->prefs[
"style"] ==
"" ||
246 $this->prefs[
"style"] = $this->ilias->ini->readVariable(
"layout",
"style");
249 if (empty($this->prefs[
"hits_per_page"]))
251 $this->prefs[
"hits_per_page"] = 10;
257 $ilErr->raiseError(
"<b>Error: There is no dataset with id ".
258 $this->
id.
"!</b><br />class: ".get_class($this).
"<br />Script: ".__FILE__.
259 "<br />Line: ".__LINE__, $ilErr->FATAL);
278 if (! $a_data[
"passwd_type"])
280 $ilErr->raiseError(
"<b>Error: passwd_type missing in function assignData(). ".
281 $this->
id.
"!</b><br />class: ".get_class($this).
"<br />Script: "
282 .__FILE__.
"<br />Line: ".__LINE__, $ilErr->FATAL);
284 if ($a_data[
"passwd"] !=
"********" and strlen($a_data[
'passwd']))
286 $this->
setPasswd($a_data[
"passwd"], $a_data[
"passwd_type"]);
294 if (!is_array($a_data[
'birthday']))
307 $this->
setCity($a_data[
"city"]);
314 $this->
setFax($a_data[
"fax"]);
338 $this->create_date = $a_data[
"create_date"];
339 $this->
setComment($a_data[
"referral_comment"]);
340 $this->approve_date = $a_data[
"approve_date"];
341 $this->active = $a_data[
"active"];
342 $this->agree_date = $a_data[
"agree_date"];
373 $this->agree_date =
"1970-01-01 00:00:00";
374 switch ($this->passwd_type)
377 $pw_field =
"passwd";
378 if(strlen($this->passwd))
380 $pw_value = md5($this->passwd);
389 $pw_field =
"passwd";
394 $pw_field =
"i2passwd";
399 $ilErr->raiseError(
"<b>Error: passwd_type missing in function saveAsNew. ".
400 $this->
id.
"!</b><br />class: ".get_class($this).
"<br />Script: ".__FILE__.
401 "<br />Line: ".__LINE__, $ilErr->FATAL);
404 $insert_array = array(
405 "usr_id" => array(
"integer", $this->
id),
406 "login" => array(
"text", $this->login),
407 $pw_field => array(
"text", $pw_value),
408 "firstname" => array(
"text", $this->firstname),
409 "lastname" => array(
"text", $this->lastname),
410 "title" => array(
"text", $this->utitle),
411 "gender" => array(
"text", $this->gender),
412 "email" => array(
"text", trim($this->email)),
413 "hobby" => array(
"text", (
string) $this->hobby),
414 "institution" => array(
"text", $this->institution),
415 "department" => array(
"text", $this->department),
416 "street" => array(
"text", $this->street),
417 "city" => array(
"text", $this->city),
418 "zipcode" => array(
"text", $this->zipcode),
419 "country" => array(
"text", $this->country),
420 "sel_country" => array(
"text", $this->sel_country),
421 "phone_office" => array(
"text", $this->phone_office),
422 "phone_home" => array(
"text", $this->phone_home),
423 "phone_mobile" => array(
"text", $this->phone_mobile),
424 "fax" => array(
"text", $this->fax),
426 "last_login" => array(
"timestamp", null),
427 "last_update" => array(
"timestamp",
ilUtil::now()),
428 "create_date" => array(
"timestamp",
ilUtil::now()),
429 "referral_comment" => array(
"text", $this->referral_comment),
430 "matriculation" => array(
"text", $this->matriculation),
431 "client_ip" => array(
"text", $this->client_ip),
432 "approve_date" => array(
"timestamp", $this->approve_date),
433 "agree_date" => array(
"timestamp", $this->agree_date),
434 "active" => array(
"integer", (
int) $this->active),
439 "auth_mode" => array(
"text", $this->
getAuthMode()),
442 "im_icq" => array(
"text", $this->im_icq),
443 "im_yahoo" => array(
"text", $this->im_yahoo),
444 "im_msn" => array(
"text", $this->im_msn),
445 "im_aim" => array(
"text", $this->im_aim),
446 "im_skype" => array(
"text", $this->im_skype),
447 "delicious" => array(
"text", $this->delicious),
448 "latitude" => array(
"text", $this->latitude),
449 "longitude" => array(
"text", $this->longitude),
450 "loc_zoom" => array(
"integer", (
int) $this->loc_zoom),
451 "last_password_change" => array(
"integer", (
int) $this->last_password_change_ts),
452 "im_jabber" => array(
"text", $this->im_jabber),
453 "im_voip" => array(
"text", $this->im_voip)
455 $ilDB->insert(
"usr_data", $insert_array);
463 include_once (
"Services/Mail/classes/class.ilMailbox.php");
465 $mbox->createDefaultFolder();
467 include_once
"Services/Mail/classes/class.ilMailOptions.php";
469 $mail_options->createMailOptionsEntry();
472 include_once
"./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php";
474 $bmf->createNewBookmarkTree();
488 $update_array = array(
489 "gender" => array(
"text", $this->gender),
490 "title" => array(
"text", $this->utitle),
491 "firstname" => array(
"text", $this->firstname),
492 "lastname" => array(
"text", $this->lastname),
493 "email" => array(
"text", trim($this->email)),
495 "hobby" => array(
"text", $this->hobby),
496 "institution" => array(
"text", $this->institution),
497 "department" => array(
"text", $this->department),
498 "street" => array(
"text", $this->street),
499 "city" => array(
"text", $this->city),
500 "zipcode" => array(
"text", $this->zipcode),
501 "country" => array(
"text", $this->country),
502 "sel_country" => array(
"text", $this->sel_country),
503 "phone_office" => array(
"text", $this->phone_office),
504 "phone_home" => array(
"text", $this->phone_home),
505 "phone_mobile" => array(
"text", $this->phone_mobile),
506 "fax" => array(
"text", $this->fax),
507 "referral_comment" => array(
"text", $this->referral_comment),
508 "matriculation" => array(
"text", $this->matriculation),
509 "client_ip" => array(
"text", $this->client_ip),
510 "approve_date" => array(
"timestamp", $this->approve_date),
511 "active" => array(
"integer", $this->active),
518 "auth_mode" => array(
"text", $this->
getAuthMode()),
520 "im_icq" => array(
"text", $this->im_icq),
521 "im_yahoo" => array(
"text", $this->im_yahoo),
522 "im_msn" => array(
"text", $this->im_msn),
523 "im_aim" => array(
"text", $this->im_aim),
524 "im_skype" => array(
"text", $this->im_skype),
525 "delicious" => array(
"text", $this->delicious),
526 "latitude" => array(
"text", $this->latitude),
527 "longitude" => array(
"text", $this->longitude),
528 "loc_zoom" => array(
"integer", (
int) $this->loc_zoom),
529 "last_password_change" => array(
"integer", $this->last_password_change_ts),
530 "im_jabber" => array(
"text", $this->im_jabber),
531 "im_voip" => array(
"text", $this->im_voip),
535 if (isset($this->agree_date) && (strtotime($this->agree_date) !==
false || $this->agree_date == null))
537 $update_array[
"agree_date"] = array(
"timestamp", $this->agree_date);
539 switch ($this->passwd_type)
542 if(strlen($this->passwd))
544 $update_array[
"i2passwd"] = array(
"text", (
string)
"");
545 $update_array[
"passwd"] = array(
"text", (
string) md5($this->passwd));
549 $update_array[
"i2passwd"] = array(
"text", (
string)
"");
550 $update_array[
"passwd"] = array(
"text", (
string) $this->passwd);
555 $update_array[
"i2passwd"] = array(
"text", (
string)
"");
556 $update_array[
"passwd"] = array(
"text", (
string) $this->passwd);
560 $update_array[
"i2passwd"] = array(
"text", (
string) $this->passwd);
561 $update_array[
"passwd"] = array(
"text", (
string)
"");
565 $ilErr->raiseError(
"<b>Error: passwd_type missing in function update()".$this->
id.
"!</b><br />class: ".
566 get_class($this).
"<br />Script: ".__FILE__.
"<br />Line: ".__LINE__, $ilErr->FATAL);
569 $ilDB->update(
"usr_data", $update_array, array(
"usr_id" => array(
"integer", $this->
id)));
581 $ilAppEventHandler->raise(
"Services/User",
"afterUpdate",
582 array(
"user_obj" => $this));
594 $ilDB->manipulateF(
"UPDATE usr_data SET agree_date = ".$ilDB->now().
595 " WHERE usr_id = %s", array(
"integer"), array($this->
getId()));
601 private function _lookup($a_user_id, $a_field)
605 $res = $ilDB->queryF(
"SELECT ".$a_field.
" FROM usr_data WHERE usr_id = %s",
606 array(
"integer"), array($a_user_id));
608 while($set = $ilDB->fetchAssoc(
$res))
610 return $set[$a_field];
622 $set = $ilDB->queryF(
"SELECT title, firstname, lastname FROM usr_data WHERE usr_id = %s",
623 array(
"integer"), array($a_user_id));
625 if ($rec = $ilDB->fetchAssoc($set))
631 if ($rec[
"firstname"])
635 if ($rec[
"lastname"])
687 $res = $ilDB->queryF(
"SELECT firstname, lastname, title, login FROM usr_data WHERE usr_id = %s",
688 array(
"integer"), array($a_user_id));
689 $user_rec = $ilDB->fetchAssoc(
$res);
690 return array(
"user_id" => $a_user_id,
691 "firstname" => $user_rec[
"firstname"],
692 "lastname" => $user_rec[
"lastname"],
693 "title" => $user_rec[
"title"],
694 "login" => $user_rec[
"login"]);
704 $res = $ilDB->queryF(
"SELECT * FROM usr_data WHERE usr_id = %s",
705 array(
"integer"), array($a_user_id));
706 $user_rec = $ilDB->fetchAssoc(
$res);
733 $res = $ilDB->queryF(
"SELECT usr_id FROM usr_data WHERE login = %s",
734 array(
"text"), array($a_user_str));
735 $user_rec = $ilDB->fetchAssoc(
$res);
736 return $user_rec[
"usr_id"];
757 $ilDB->manipulateF(
"UPDATE usr_data SET ".
758 "last_login = ".$ilDB->now().
759 " WHERE usr_id = %s",
760 array(
"integer"), array($this->
id));
774 $this->passwd = $new_md5;
776 $ilDB->manipulateF(
"UPDATE usr_data SET ".
779 array(
"text",
"integer"), array($this->passwd, $this->
id));
796 if (func_num_args() != 3)
801 if (!isset($a_old) or !isset($a_new1) or !isset($a_new2))
806 if ($a_new1 != $a_new2)
812 if ($a_new1 ==
"" || $a_old ==
"")
818 switch ($this->passwd_type)
821 if ($a_old != $this->passwd)
828 if (md5($a_old) != $this->passwd)
843 $this->passwd = md5($a_new1);
846 $ilDB->manipulateF(
"UPDATE usr_data SET ".
849 array(
"text",
"integer"), array($this->passwd, $this->
id));
865 if (func_num_args() != 2)
870 if (!isset($a_new1) or !isset($a_new2))
875 if ($a_new1 != $a_new2)
881 $this->passwd = md5($a_new1);
884 $ilDB->manipulateF(
"UPDATE usr_data SET ".
887 array(
"text",
"integer"),
888 array($this->passwd, $this->
id));
898 return (crypt($a_passwd,substr($a_passwd,0,2)));
908 $user_set = $ilDB->queryF(
"SELECT i2passwd FROM usr_data ".
909 "WHERE login = %s", array(
"text"), array($a_user_login));
910 if ($user_rec = $ilDB->fetchAssoc($user_set))
912 if ($user_rec[
"i2passwd"] !=
"")
928 $user_set = $ilDB->queryF(
"SELECT i2passwd FROM usr_data ".
929 "WHERE login = %s", array(
"text"), array($a_user_login));
930 if ($user_rec = $ilDB->fetchAssoc($user_set))
934 $ilDB->manipulateF(
"UPDATE usr_data SET passwd = %s, i2passwd = %s".
936 array(
"text",
"text",
"text"),
937 array(md5($a_pw),
"", $a_user));
959 $res = $ilDB->queryF(
'
960 SELECT * FROM loginname_history
962 array(
'text'), array($a_login));
964 return $ilDB->fetchAssoc(
$res) ?
true :
false;
983 $ilDB->setLimit(1, 0);
984 $res = $ilDB->queryF(
'
985 SELECT login, history_date FROM loginname_history
986 WHERE usr_id = %s ORDER BY history_date DESC',
987 array(
'integer'), array($a_usr_id));
1007 if(func_num_args() != 1)
1012 if(!isset($a_login))
1018 if($a_login == self::_lookupLogin($this->
getId()))
1030 if((
int)$ilSetting->get(
'allow_change_loginname') &&
1031 (int)$ilSetting->get(
'prevent_reuse_of_loginnames') &&
1034 throw new ilUserException($this->lng->txt(
'loginname_already_exists'));
1036 else if((
int)$ilSetting->get(
'allow_change_loginname') &&
1037 (int)$ilSetting->get(
'loginname_change_blocking_time') &&
1038 is_array($last_history_entry) &&
1039 $last_history_entry[1] + (int)$ilSetting->get(
'loginname_change_blocking_time') > time())
1041 include_once
'Services/Calendar/classes/class.ilDate.php';
1044 $this->lng->txt(
'changing_loginname_not_possible_info'),
1048 new ilDateTime(($last_history_entry[1] + (
int)$ilSetting->get(
'loginname_change_blocking_time')),
IL_CAL_UNIX))
1055 if((
int)$ilSetting->get(
'allow_change_loginname') &&
1056 (int)$ilSetting->get(
'create_history_loginname'))
1062 $this->login = $a_login;
1064 $ilDB->manipulateF(
'
1068 array(
'text',
'integer'), array($this->
getLogin(), $this->
getId()));
1083 $this->
setPref($a_keyword, $a_value);
1106 $ilDB->manipulateF(
"DELETE FROM usr_pref WHERE usr_id = %s AND keyword = %s",
1107 array(
"integer",
"text"), array($a_user_id, $a_keyword));
1119 $ilDB->manipulateF(
"DELETE FROM usr_pref WHERE usr_id = %s",
1120 array(
"integer"), array($a_user_id));
1131 if (strlen($a_value))
1133 $ilDB->manipulateF(
"INSERT INTO usr_pref (usr_id, keyword, value) VALUES (%s,%s,%s)",
1134 array(
"integer",
"text",
"text"), array($a_usr_id, $a_keyword, $a_value));
1147 foreach ($this->prefs as $keyword => $value)
1161 if($tz = $this->
getPref(
'user_tz'))
1167 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
1169 return $settings->getDefaultTimeZone();
1181 if($format = $this->
getPref(
'time_format'))
1187 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
1189 return $settings->getDefaultTimeFormat();
1201 if($format = $this->
getPref(
'date_format'))
1207 include_once(
'Services/Calendar/classes/class.ilCalendarSettings.php');
1209 return $settings->getDefaultDateFormat();
1221 if ($a_keyword !=
"")
1223 $this->prefs[$a_keyword] = $a_value;
1234 if (array_key_exists($a_keyword, $this->prefs))
1236 return $this->prefs[$a_keyword];
1248 $query =
"SELECT * FROM usr_pref WHERE usr_id = ".$ilDB->quote($a_usr_id,
"integer").
" ".
1249 "AND keyword = ".$ilDB->quote($a_keyword,
"text");
1267 if (is_array($this->prefs))
1282 global $rbacadmin,
$ilDB;
1285 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1287 $mapping->deleteUser($this->
getId());
1290 include_once (
"Services/Mail/classes/class.ilMailbox.php");
1293 $mailbox->updateMailsOfDeletedUser();
1296 include_once(
"./Services/Block/classes/class.ilCustomBlock.php");
1298 $costum_block->setContextObjId($this->
getId());
1299 $costum_block->setContextObjType(
"user");
1300 $c_blocks = $costum_block->queryBlocksForContext();
1301 include_once(
"./Services/Feeds/classes/class.ilPDExternalFeedBlock.php");
1302 foreach($c_blocks as $c_block)
1304 if ($c_block[
"type"] ==
"pdfeed")
1313 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1317 $ilDB->manipulateF(
"DELETE FROM usr_data WHERE usr_id = %s",
1318 array(
"integer"), array($this->
getId()));
1324 include_once(
"./Services/Authentication/classes/class.ilSession.php");
1328 $rbacadmin->removeUser($this->
getId());
1332 $q =
"DELETE FROM bookmark_tree WHERE tree = ".
1333 $ilDB->quote($this->
getId(),
"integer");
1334 $ilDB->manipulate($q);
1336 $q =
"DELETE FROM bookmark_data WHERE user_id = ".
1337 $ilDB->quote($this->
getId(),
"integer");
1338 $ilDB->manipulate($q);
1341 include_once
'./classes/class.ilLinkCheckNotify.php';
1345 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
1349 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1352 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1356 include_once
'Modules/Scorm2004/classes/ilSCORM13Package.php';
1360 include_once
'Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
1364 include_once
"./Services/Notification/classes/class.ilNotification.php";
1378 global $ilAppEventHandler;
1379 $ilAppEventHandler->raise(
1380 'Services/User',
'deleteUser', array(
'usr_id' => $this->
getId())
1397 function setFullname($a_title =
"",$a_firstname =
"",$a_lastname =
"")
1399 $this->fullname =
"";
1405 elseif ($this->utitle)
1407 $this->fullname = $this->utitle.
" ";
1414 elseif ($this->firstname)
1416 $this->fullname .= $this->firstname.
" ";
1448 if (strlen($this->fullname) <= $a_max_strlen)
1453 if ((strlen($this->utitle) + strlen($this->lastname) + 4) <= $a_max_strlen)
1455 return ilUtil::stripSlashes($this->utitle.
" ".substr($this->firstname,0,1).
". ".$this->lastname);
1458 if ((strlen($this->firstname) + strlen($this->lastname) + 1) <= $a_max_strlen)
1463 if ((strlen($this->lastname) + 3) <= $a_max_strlen)
1482 $q =
"SELECT * FROM lo_access ".
1483 "WHERE usr_id= ".$ilDB->quote((
int) $this->
id,
"integer").
" ".
1484 "ORDER BY timestamp DESC";
1485 $rst = $ilDB->query($q);
1489 while($record = $ilDB->fetchObject($rst))
1492 "timestamp" => $record->timestamp,
1493 "usr_id" => $record->usr_id,
1494 "lm_id" => $record->lm_id,
1495 "obj_id" => $record->obj_id,
1496 "lm_title" => $record->lm_title);
1512 $q =
"SELECT * FROM lo_access ".
1513 "WHERE usr_id= ".$ilDB->quote((
int) $this->
id,
"integer").
" ";
1514 $rst = $ilDB->query($q);
1521 "timestamp" => $record->timestamp,
1522 "usr_id" => $record->usr_id,
1523 "lm_id" => $record->lm_id,
1524 "obj_id" => $record->obj_id,
1525 "lm_title" => $record->lm_title);
1542 if($a_username ==
'root')
1547 $res = $ilDB->queryF(
"SELECT usr_id FROM usr_data ".
1548 "WHERE login = %s AND NOT agree_date IS NULL",
1549 array(
"text"), array($a_username));
1550 return $ilDB->fetchAssoc(
$res) ?
true :
false;
1559 if ($this->agree_date != null || $this->login ==
"root")
1573 $this->login = $a_str;
1592 $this->passwd = $a_str;
1593 $this->passwd_type = $a_type;
1625 $this->gender = substr($a_str,-1);
1646 $this->utitle = $a_str;
1667 $this->firstname = $a_str;
1686 $this->lastname = $a_str;
1705 $this->institution = $a_str;
1724 $this->department = $a_str;
1743 $this->street = $a_str;
1762 $this->city = $a_str;
1781 $this->zipcode = $a_str;
1801 $this->country = $a_str;
1821 $this->sel_country = $a_val;
1841 $this->phone_office = $a_str;
1860 $this->phone_home = $a_str;
1879 $this->phone_mobile = $a_str;
1898 $this->fax = $a_str;
1917 $this->client_ip = $a_str;
1936 $this->matriculation = $a_str;
1958 $query =
"SELECT matriculation FROM usr_data ".
1959 "WHERE usr_id = ".$ilDB->quote($a_usr_id);
1962 return $row->matriculation ?
$row->matriculation :
'';
1972 $this->email = $a_str;
1991 $this->hobby = $a_str;
2010 $this->
setPref(
"language",$a_str);
2021 return $this->prefs[
"language"];
2034 $this->
setPref(
"disk_quota",$a_disk_quota);
2048 return $this->prefs[
"disk_quota"] ? $this->prefs[
"disk_quota"] : 0;
2053 $this->last_password_change_ts = $a_last_password_change_ts;
2066 $q =
"SELECT value FROM usr_pref WHERE usr_id= ".
2067 $ilDB->quote($a_usr_id,
"integer").
" AND keyword = ".
2068 $ilDB->quote(
'language',
"text");
2069 $r = $ilDB->query($q);
2071 while(
$row = $ilDB->fetchAssoc($r))
2073 return $row[
'value'];
2084 if ($pw == md5($a_pw))
2095 $ilDB->manipulateF(
"UPDATE usr_data ".
2096 " SET ext_account = %s WHERE usr_id = %s",
2097 array(
"text",
"integer"),
2098 array($a_ext_id, $a_usr_id));
2105 $ilDB->manipulateF(
"UPDATE usr_data ".
2106 " SET auth_mode = %s WHERE usr_id = %s",
2107 array(
"text",
"integer"),
2108 array($a_auth_mode, $a_usr_id));
2127 $this->last_login = $a_str;
2137 return $this->last_login;
2147 $this->last_update = $a_str;
2161 $this->referral_comment = $a_str;
2181 $this->approve_date = $a_str;
2212 $this->agree_date = $a_str;
2255 $query =
'SELECT usr_id FROM usr_data '.
2256 'WHERE active = '.$ilDB->quote(1,
'integer').
' '.
2257 'AND usr_id = '.$ilDB->quote($a_usr_id,
'integer');
2287 if ((!empty($storedActive) && empty($currentActive)) ||
2288 (empty($storedActive) && !empty($currentActive)))
2303 return $active ?
true :
false;
2314 $this->skin = $a_str;
2319 $this->time_limit_owner = $a_owner;
2323 return $this->time_limit_owner ? $this->time_limit_owner : 7;
2327 $this->time_limit_from = $a_from;
2331 return $this->time_limit_from ? $this->time_limit_from : time();
2335 $this->time_limit_until = $a_until;
2339 return $this->time_limit_until ? $this->time_limit_until : time();
2343 $this->time_limit_unlimited = $a_unlimited;
2347 return $this->time_limit_unlimited;
2351 return $this->time_limit_message = $a_time_limit_message;
2355 return $this->time_limit_message;
2360 $this->login_attempts = $a_login_attempts;
2383 $this->profile_incomplete = (boolean) $a_prof_inc;
2387 return $this->profile_incomplete;
2393 if( $this->
id == ANONYMOUS_USER_ID || $this->
id == SYSTEM_USER_ID )
2396 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2400 && $security->isPasswordChangeOnFirstLoginEnabled()
2411 if($this->
id == ANONYMOUS_USER_ID)
return false;
2413 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
2418 $max_pass_age = $security->getPasswordMaxAge();
2419 if( $max_pass_age > 0 )
2421 $max_pass_age_ts = ( $max_pass_age * 86400 );
2423 $current_ts = time();
2425 if( ($current_ts - $pass_change_ts) > $max_pass_age_ts )
2434 $current_ts = time();
2436 $password_age = (int) ( ($current_ts - $pass_change_ts) / 86400 );
2437 return $password_age;
2446 $query =
"UPDATE usr_data SET usr_data.last_password_change = %s " .
2447 "WHERE usr_data.usr_id = %s";
2448 $affected = $ilDB->manipulateF(
$query,
2449 array(
'integer',
'integer'),
2451 if($affected)
return true;
2459 $query =
"UPDATE usr_data SET usr_data.last_password_change = 0 " .
2460 "WHERE usr_data.usr_id = %s";
2461 $affected = $ilDB->manipulateF(
$query, array(
'integer'),
2462 array($this->
getId()) );
2463 if($affected)
return true;
2474 $this->latitude = $a_latitude;
2494 $this->longitude = $a_longitude;
2514 $this->loc_zoom = $a_locationzoom;
2529 $this->applied_users = array();
2532 return $this->applied_users ? $this->applied_users : array();
2537 if($a_usr_id == $this->
getId())
2542 $this->applied_users = array();
2545 return in_array($a_usr_id,$this->applied_users);
2552 $res = $ilDB->queryF(
"SELECT usr_id FROM usr_data ".
2553 "WHERE time_limit_owner = %s",
2555 array($a_parent_id));
2556 while (
$row = $ilDB->fetchObject(
$res))
2558 $this->applied_users[] =
$row->usr_id;
2579 if(
$id != ANONYMOUS_USER_ID && (
int)$ilSetting->get(
'ps_prevent_simultaneous_logins') == 1 )
2581 $res = $ilDB->queryf(
'
2582 SELECT * FROM usr_session WHERE user_id = %s AND expires > %s',
2583 array(
'integer',
'integer'),
2584 array(
$id, time()));
2606 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
2609 require_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
2610 require_once (
'Services/Database/classes/class.ilAuthContainerMDB2.php');
2615 $login =$ilAuth->getUsername();
2628 global
$ilDB,$ilAuth;
2631 $set = $ilDB->queryF(
"SELECT active FROM usr_data WHERE login= %s",
2635 if ($rec = $ilDB->fetchAssoc($set))
2671 $res = $ilDB->queryF(
"SELECT login FROM usr_data ".
2672 "WHERE email = %s and active = 1",
2676 while(
$row = $ilDB->fetchObject(
$res))
2678 $ids[] =
$row->login;
2698 $res = $ilDB->queryF(
"SELECT usr_id FROM usr_data ".
2699 "WHERE email = %s", array(
"text"), array($a_email));
2702 return $row->usr_id ?
$row->usr_id : 0;
2729 static function searchUsers($a_search_str,
$active = 1, $a_return_ids_only =
false, $filter_settings = FALSE)
2734 $query =
"SELECT usr_data.usr_id, usr_data.login, usr_data.firstname, usr_data.lastname, usr_data.email, usr_data.active FROM usr_data ";
2736 $without_anonymous_users =
true;
2739 $join_filter =
" WHERE ";
2740 if ($filter_settings !== FALSE && strlen($filter_settings))
2742 switch ($filter_settings)
2746 $join_filter =
" LEFT JOIN crs_members ON usr_data.usr_id = crs_members.usr_id WHERE crs_members.usr_id IS NULL AND ";
2753 $join_filter =
" LEFT JOIN crs_members ON usr_data.usr_id = crs_members.usr_id WHERE crs_members.obj_id = ".
2754 "(SELECT obj_id FROM object_reference WHERE ref_id = ".$ilDB->quote(
$ref_id,
"integer").
") AND ";
2762 $rolf = $rbacreview->getRoleFolderOfObject(
$ref_id);
2763 $local_roles = $rbacreview->getRolesOfRoleFolder($rolf[
"ref_id"],
false);
2764 if (is_array($local_roles) && count($local_roles))
2766 $join_filter =
" LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2767 $ilDB->in(
"rbac_ua.rol_id", $local_roles,
false, $local_roles).
" AND ";
2773 $rol_id =
$_SESSION[
"user_filter_data"];
2776 $join_filter =
" LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2777 $ilDB->quote($rol_id,
"integer").
" AND ";
2778 $without_anonymous_users =
false;
2785 if (strtolower(substr($a_search_str, 0, 5)) ==
"role:")
2787 $query =
"SELECT DISTINCT usr_data.usr_id,usr_data.login,usr_data.firstname,usr_data.lastname,usr_data.email ".
2788 "FROM object_data,rbac_ua,usr_data ".
2789 "WHERE ".$ilDB->like(
"object_data.title",
"text",
"%".substr($a_search_str,5).
"%").
2790 " AND object_data.type = 'role' ".
2791 "AND rbac_ua.rol_id = object_data.obj_id ".
2792 "AND usr_data.usr_id = rbac_ua.usr_id ".
2793 "AND rbac_ua.usr_id != ".$illDB->quote(ANONYMOUS_USER_ID,
"integer");
2798 "(".$ilDB->like(
"usr_data.login",
"text",
"%".$a_search_str.
"%").
" ".
2799 "OR ".$ilDB->like(
"usr_data.firstname",
"text",
"%".$a_search_str.
"%").
" ".
2800 "OR ".$ilDB->like(
"usr_data.lastname",
"text",
"%".$a_search_str.
"%").
" ".
2801 "OR ".$ilDB->like(
"usr_data.email",
"text",
"%".$a_search_str.
"%").
") ";
2803 if ($filter_settings !== FALSE && strlen($filter_settings))
2805 switch ($filter_settings)
2808 $query.=
" AND usr_data.active = ".$ilDB->quote(0,
"integer").
" ";
2811 $query.=
" AND usr_data.active = ".$ilDB->quote(1,
"integer").
" ";
2814 $query.=
" AND usr_data.time_limit_unlimited = ".$ilDB->quote(0,
"integer").
" ";
2817 $date = strftime(
"%Y-%m-%d %H:%I:%S", mktime(0, 0, 0,
$_SESSION[
"user_filter_data"][
"m"],
$_SESSION[
"user_filter_data"][
"d"],
$_SESSION[
"user_filter_data"][
"y"]));
2818 $query.=
" AND last_login < ".$ilDB->quote($date,
"timestamp").
" ";
2823 if ($without_anonymous_users)
2825 $query.=
"AND usr_data.usr_id != ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer");
2828 if (is_numeric(
$active) &&
$active > -1 && $filter_settings === FALSE)
2830 $query.=
" AND active = ".$ilDB->quote(
$active,
"integer").
" ";
2836 while (
$row = $ilDB->fetchObject(
$res))
2839 "usr_id" =>
$row->usr_id,
2840 "login" =>
$row->login,
2841 "firstname" =>
$row->firstname,
2842 "lastname" =>
$row->lastname,
2843 "email" =>
$row->email,
2844 "active" =>
$row->active);
2845 $ids[] =
$row->usr_id;
2847 if ($a_return_ids_only)
2848 return $ids ? $ids : array();
2850 return $users ? $users : array();
2865 $res = $ilDB->query(
"SELECT login FROM usr_data");
2866 while(
$row = $ilDB->fetchObject(
$res))
2868 $logins[] =
$row->login;
2870 return $logins ? $logins : array();
2884 $res = $ilDB->query(
"SELECT * FROM usr_data WHERE ".
2885 $ilDB->in(
"usr_id", $a_user_ids,
false,
"integer"));
2886 while (
$row = $ilDB->fetchAssoc(
$res))
2888 $user_data[
"$row[usr_id]"] =
$row;
2890 return $user_data ? $user_data : array();
2905 $result_arr = array();
2909 if ($a_fields !== NULL and is_array($a_fields))
2911 if (count($a_fields) == 0)
2917 if (($usr_id_field = array_search(
"usr_id",$a_fields)) !==
false)
2918 unset($a_fields[$usr_id_field]);
2920 $select = implode(
",",$a_fields).
",usr_data.usr_id";
2922 if(in_array(
'online_time',$a_fields))
2924 $select .=
",ut_online.online_time ";
2928 $q =
"SELECT ".$select.
" FROM usr_data ";
2932 if(in_array(
'online_time',$a_fields))
2934 $q .=
"LEFT JOIN ut_online ON usr_data.usr_id = ut_online.usr_id ";
2941 $q .=
"WHERE active = ".$ilDB->quote(
$active,
"integer");
2944 $q .=
"WHERE time_limit_unlimited= ".$ilDB->quote(0,
"integer");;
2947 $qtemp = $q .
", rbac_ua, object_data WHERE rbac_ua.rol_id = object_data.obj_id AND ".
2948 $ilDB->like(
"object_data.title",
"text",
"%crs%").
" AND usr_data.usr_id = rbac_ua.usr_id";
2949 $r = $ilDB->query($qtemp);
2950 $course_users = array();
2951 while (
$row = $ilDB->fetchAssoc($r))
2953 array_push($course_users,
$row[
"usr_id"]);
2955 if (count($course_users))
2957 $q .=
" WHERE ".$ilDB->in(
"usr_data.usr_id", $course_users,
true,
"integer").
" ";
2965 $date = strftime(
"%Y-%m-%d %H:%I:%S", mktime(0, 0, 0,
$_SESSION[
"user_filter_data"][
"m"],
$_SESSION[
"user_filter_data"][
"d"],
$_SESSION[
"user_filter_data"][
"y"]));
2966 $q.=
" AND last_login < ".$ilDB->quote($date,
"timestamp");
2972 $q .=
" LEFT JOIN crs_members ON usr_data.usr_id = crs_members.usr_id ".
2973 "WHERE crs_members.obj_id = (SELECT obj_id FROM object_reference ".
2974 "WHERE ref_id = ".$ilDB->quote(
$ref_id,
"integer").
") ";
2982 $rolf = $rbacreview->getRoleFolderOfObject(
$ref_id);
2983 $local_roles = $rbacreview->getRolesOfRoleFolder($rolf[
"ref_id"],
false);
2984 if (is_array($local_roles) && count($local_roles))
2986 $q.=
" LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE ".
2987 $ilDB->in(
"rbac_ua.rol_id", $local_roles,
false,
"integer").
" ";
2992 $rol_id =
$_SESSION[
"user_filter_data"];
2995 $q .=
" LEFT JOIN rbac_ua ON usr_data.usr_id = rbac_ua.usr_id WHERE rbac_ua.rol_id = ".
2996 $ilDB->quote($rol_id,
"integer");
3000 $r = $ilDB->query($q);
3002 while (
$row = $ilDB->fetchAssoc($r))
3004 $result_arr[] =
$row;
3018 $q =
"SELECT count(*) as cnt FROM usr_pref up1, usr_pref up2 ".
3019 " WHERE up1.keyword= ".$ilDB->quote(
"style",
"text").
3020 " AND up1.value= ".$ilDB->quote($a_style,
"text").
3021 " AND up2.keyword= ".$ilDB->quote(
"skin",
"text").
3022 " AND up2.value= ".$ilDB->quote($a_skin,
"text").
3023 " AND up1.usr_id = up2.usr_id ";
3025 $cnt_set = $ilDB->query($q);
3027 $cnt_rec = $ilDB->fetchAssoc($cnt_set);
3029 return $cnt_rec[
"cnt"];
3039 $q =
"SELECT DISTINCT up1.value style, up2.value skin FROM usr_pref up1, usr_pref up2 ".
3040 " WHERE up1.keyword = ".$ilDB->quote(
"style",
"text").
3041 " AND up2.keyword = ".$ilDB->quote(
"skin",
"text").
3042 " AND up1.usr_id = up2.usr_id";
3044 $sty_set = $ilDB->query($q);
3047 while($sty_rec = $ilDB->fetchAssoc($sty_set))
3049 $styles[] = $sty_rec[
"skin"].
":".$sty_rec[
"style"];
3062 $q =
"SELECT up1.usr_id usr_id FROM usr_pref up1, usr_pref up2 ".
3063 " WHERE up1.keyword= ".$ilDB->quote(
"style",
"text").
3064 " AND up1.value= ".$ilDB->quote($a_from_style,
"text").
3065 " AND up2.keyword= ".$ilDB->quote(
"skin",
"text").
3066 " AND up2.value= ".$ilDB->quote($a_from_skin,
"text").
3067 " AND up1.usr_id = up2.usr_id ";
3069 $usr_set = $ilDB->query($q);
3071 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
3092 $item_set = $ilDB->queryF(
"SELECT * FROM desktop_item WHERE ".
3093 "item_id = %s AND type = %s AND user_id = %s",
3094 array(
"integer",
"text",
"integer"),
3095 array($a_item_id, $a_type, $a_usr_id));
3098 if (!$ilDB->fetchAssoc($item_set))
3100 $ilDB->manipulateF(
"INSERT INTO desktop_item (item_id, type, user_id, parameters) VALUES ".
3101 " (%s,%s,%s,%s)", array(
"integer",
"text",
"integer",
"text"),
3102 array($a_item_id,$a_type,$a_usr_id,$a_par));
3105 include_once
'./Services/Calendar/classes/class.ilCalendarCategories.php';
3133 $ilDB->manipulateF(
"UPDATE desktop_item SET parameters = %s ".
3134 " WHERE item_id = %s AND type = %s AND user_id = %s",
3135 array(
"text",
"integer",
"text",
"integer"),
3136 array($a_par, $a_item_id, $a_type, $this->
getId()));
3153 $ilDB->manipulateF(
"DELETE FROM desktop_item WHERE ".
3154 " item_id = %s AND type = %s AND user_id = %s",
3155 array(
"integer",
"text",
"integer"),
3156 array($a_item_id, $a_type, $a_usr_id));
3158 include_once
'./Services/Calendar/classes/class.ilCalendarCategories.php';
3184 $r = $ilDB->queryF(
"SELECT user_id FROM desktop_item WHERE item_id = %s",
3185 array(
"integer"), array($a_id));
3189 while (
$row = $ilDB->fetchObject($r))
3191 $users[] =
$row->user_id;
3194 if (count($users) > 0)
3196 $ilDB->manipulateF(
"DELETE FROM desktop_item WHERE item_id = %s",
3197 array(
"integer"), array($a_id));
3216 if (self::$is_desktop_item_loaded[$a_usr_id.
":".$a_item_id])
3218 return self::$is_desktop_item_cache[$a_usr_id.
":".$a_item_id.
":".$a_type];
3220 $item_set = $ilDB->queryF(
"SELECT item_id FROM desktop_item WHERE ".
3221 "item_id = %s AND type = %s AND user_id = %s",
3222 array(
"integer",
"text",
"integer"),
3223 array($a_item_id, $a_type, $a_usr_id));
3225 if ($ilDB->fetchAssoc($item_set))
3245 if (!is_array($a_item_ids))
3250 $item_ids = array();
3251 foreach ($a_item_ids as
$id)
3253 if (!self::$is_desktop_item_loaded[$a_usr_id.
":".$id])
3257 self::$is_desktop_item_loaded[$a_usr_id.
":".
$id] =
true;
3260 if (count($item_ids) > 0)
3262 $item_set = $ilDB->query(
"SELECT item_id, type FROM desktop_item WHERE ".
3263 $ilDB->in(
"item_id", $item_ids,
false,
"integer").
3264 " AND user_id = ".$ilDB->quote($a_usr_id,
"integer"));
3265 while ($r = $ilDB->fetchAssoc($item_set))
3267 self::$is_desktop_item_cache[$a_usr_id.
":".$r[
"item_id"].
":".$r[
"type"]]
3298 global $ilUser, $rbacsystem, $tree,
$ilDB;
3302 $item_set = $ilDB->queryF(
"SELECT obj.obj_id, obj.description, oref.ref_id, obj.title, obj.type ".
3303 " FROM desktop_item it, object_reference oref ".
3304 ", object_data obj".
3306 "it.item_id = oref.ref_id AND ".
3307 "oref.obj_id = obj.obj_id AND ".
3308 "it.user_id = %s", array(
"integer"), array($user_id));
3310 while ($item_rec = $ilDB->fetchAssoc($item_set))
3312 if ($tree->isInTree($item_rec[
"ref_id"])
3313 && $item_rec[
"type"] !=
"rolf")
3315 $parent_ref = $tree->getParentId($item_rec[
"ref_id"]);
3316 $par_left = $tree->getLeftValue($parent_ref);
3317 $par_left = sprintf(
"%010d", $par_left);
3322 $items[$par_left.$title.$item_rec[
"ref_id"]] =
3323 array(
"ref_id" => $item_rec[
"ref_id"],
3324 "obj_id" => $item_rec[
"obj_id"],
3325 "type" => $item_rec[
"type"],
3327 "description" =>
$desc,
3328 "parent_ref" => $parent_ref);
3335 if (!is_array($a_types))
3337 $a_types = array($a_types);
3340 $foundsurveys = array();
3341 foreach($a_types as $a_type)
3343 $item_set = $ilDB->queryF(
"SELECT obj.obj_id, obj.description, oref.ref_id, obj.title FROM desktop_item it, object_reference oref ".
3344 ", object_data obj WHERE ".
3345 "it.item_id = oref.ref_id AND ".
3346 "oref.obj_id = obj.obj_id AND ".
3347 "it.type = %s AND ".
3350 array(
"text",
"integer"),
3351 array($a_type, $user_id));
3353 while ($item_rec = $ilDB->fetchAssoc($item_set))
3357 $items[
$title.$a_type.$item_rec[
"ref_id"]] =
3358 array(
"ref_id" => $item_rec[
"ref_id"],
3359 "obj_id" => $item_rec[
"obj_id"],
"type" => $a_type,
3383 $a_parent = 0, $a_time = 0, $a_order_nr = 0)
3389 $a_time = date(
"Y-m-d H:i:s", time());
3392 $item_set = $ilDB->queryF(
"SELECT * FROM personal_clipboard WHERE ".
3393 "parent = %s AND item_id = %s AND type = %s AND user_id = %s",
3394 array(
"integer",
"integer",
"text",
"integer"),
3395 array(0, $a_item_id, $a_type, $this->
getId()));
3398 if (!
$d = $item_set->fetchRow())
3400 $ilDB->manipulateF(
"INSERT INTO personal_clipboard ".
3401 "(item_id, type, user_id, title, parent, insert_time, order_nr) VALUES ".
3402 " (%s,%s,%s,%s,%s,%s,%s)",
3403 array(
"integer",
"text",
"integer",
"text",
"integer",
"timestamp",
"integer"),
3404 array($a_item_id, $a_type, $this->
getId(), $a_title, (
int) $a_parent, $a_time, (
int) $a_order_nr));
3408 $ilDB->manipulateF(
"UPDATE personal_clipboard SET insert_time = %s ".
3409 "WHERE user_id = %s AND item_id = %s AND type = %s AND parent = 0",
3410 array(
"timestamp",
"integer",
"integer",
"text"),
3411 array($a_time, $this->
getId(), $a_item_id, $a_type));
3423 $a_time = date(
"Y-m-d H:i:s", time());
3425 $ilDB->insert(
"personal_pc_clipboard", array(
3426 "user_id" => array(
"integer", $this->
getId()),
3427 "content" => array(
"clob", $a_content),
3428 "insert_time" => array(
"timestamp", $a_time),
3429 "order_nr" => array(
"integer", $a_nr)
3440 $set = $ilDB->queryF(
"SELECT MAX(insert_time) mtime FROM personal_pc_clipboard ".
3441 " WHERE user_id = %s", array(
"integer"), array($this->
getId()));
3442 $row = $ilDB->fetchAssoc($set);
3444 $set = $ilDB->queryF(
"SELECT * FROM personal_pc_clipboard ".
3445 " WHERE user_id = %s AND insert_time = %s ORDER BY order_nr ASC",
3446 array(
"integer",
"timestamp"),
3449 while (
$row = $ilDB->fetchAssoc($set))
3451 $content[] =
$row[
"content"];
3464 $set = $ilDB->queryF(
"SELECT * FROM personal_clipboard WHERE ".
3465 "parent = %s AND type = %s AND user_id = %s",
3466 array(
"integer",
"text",
"integer"),
3467 array(0, $a_type, $this->
getId()));
3468 if ($rec = $ilDB->fetchAssoc($set))
3483 $ilDB->manipulateF(
"DELETE FROM personal_clipboard WHERE ".
3484 "type = %s AND user_id = %s",
3485 array(
"text",
"integer"),
3486 array($a_type, $this->
getId()));
3496 $ilDB->manipulateF(
"DELETE FROM personal_clipboard WHERE ".
3497 "user_id = %s", array(
"integer"), array($this->
getId()));
3508 if ($a_top_nodes_only)
3510 $par =
" AND parent = ".$ilDB->quote(0,
"integer").
" ";
3513 $type_str = ($a_type !=
"")
3514 ?
" AND type = ".$ilDB->quote($a_type,
"text").
" "
3516 $q =
"SELECT * FROM personal_clipboard WHERE ".
3517 "user_id = ".$ilDB->quote($this->
getId(),
"integer").
" ".
3519 " ORDER BY order_nr";
3520 $objs = $ilDB->query($q);
3522 while ($obj = $ilDB->fetchAssoc($objs))
3524 if ($obj[
"type"] ==
"mob")
3528 if ($obj[
"type"] ==
"incl")
3530 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
3533 $objects[] = array (
"id" => $obj[
"item_id"],
3534 "type" => $obj[
"type"],
"title" => $obj[
"title"],
3535 "insert_time" => $obj[
"insert_time"]);
3545 global
$ilDB, $ilUser;
3547 $objs = $ilDB->queryF(
"SELECT * FROM personal_clipboard WHERE ".
3548 "user_id = %s AND parent = %s AND insert_time = %s ".
3549 " ORDER BY order_nr",
3550 array(
"integer",
"integer",
"timestamp"),
3551 array($ilUser->getId(), (int) $a_parent, $a_insert_time));
3553 while ($obj = $ilDB->fetchAssoc($objs))
3555 if ($obj[
"type"] ==
"mob")
3559 $objects[] = array (
"id" => $obj[
"item_id"],
3560 "type" => $obj[
"type"],
"title" => $obj[
"title"]);
3577 $q =
"SELECT DISTINCT user_id FROM personal_clipboard WHERE ".
3578 "item_id = ".$ilDB->quote($a_id,
"integer").
" AND ".
3579 "type = ".$ilDB->quote($a_type,
"text");
3580 $user_set = $ilDB->query($q);
3582 while ($user_rec = $ilDB->fetchAssoc($user_set))
3584 $users[] = $user_rec[
"user_id"];
3601 $q =
"DELETE FROM personal_clipboard WHERE ".
3602 "item_id = ".$ilDB->quote($a_item_id,
"integer").
3603 " AND type = ".$ilDB->quote($a_type,
"text").
" ".
3604 " AND user_id = ".$ilDB->quote($this->
getId(),
"integer");
3605 $ilDB->manipulate($q);
3612 $query =
"SELECT obj_id FROM object_data WHERE import_id = ".
3613 $ilDB->quote($i2_id,
"text");
3616 while(
$row = $ilDB->fetchObject(
$res))
3647 $this->auth_mode = $a_str;
3661 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
3674 $this->ext_account = $a_str;
3686 return $this->ext_account;
3704 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
3705 $q =
"SELECT login,usr_id,ext_account,auth_mode FROM usr_data ".
3706 "WHERE auth_mode = %s";
3708 $values[] = $a_auth_mode;
3711 $q.=
" OR auth_mode = %s ";
3713 $values[] =
'default';
3716 $res = $ilDB->queryF($q, $types, $values);
3717 while (
$row = $ilDB->fetchObject(
$res))
3719 if(
$row->auth_mode ==
'default')
3721 $accounts[
$row->usr_id] =
$row->login;
3725 $accounts[
$row->usr_id] =
$row->ext_account;
3728 return $accounts ? $accounts : array();
3742 if(!is_array($a_usr_ids))
3746 $q =
"UPDATE usr_data SET active = %s WHERE ".
3747 $ilDB->in(
"usr_id", $a_usr_ids,
false,
"integer");
3748 $ilDB->manipulateF($q, array(
"integer"), array(($a_status ? 1 : 0)));
3778 $r = $ilDB->queryF(
"SELECT * FROM usr_data WHERE ".
3779 " ext_account = %s AND auth_mode = %s",
3780 array(
"text",
"text"),
3781 array($a_account, $a_auth));
3782 if ($usr = $ilDB->fetchAssoc($r))
3784 return $usr[
"login"];
3788 $res = $ilDB->queryF(
"SELECT login FROM usr_data ".
3789 "WHERE login = %s AND auth_mode = %s",
3790 array(
"text",
"text"),
3791 array($a_account, $a_auth));
3792 if($usr = $ilDB->fetchAssoc(
$res))
3794 return $usr[
'login'];
3800 $res = $ilDB->queryF(
"SELECT login FROM usr_data WHERE ".
3801 " ext_account = %s AND auth_mode = %s",
3802 array(
"text",
"text"),
3803 array($a_account,
"default"));
3804 if ($usr = $ilDB->fetchAssoc(
$res))
3806 return $usr[
"login"];
3809 $res = $ilDB->queryF(
"SELECT login FROM usr_data ".
3810 "WHERE login = %s AND (ext_account IS NULL OR ext_account = '') AND auth_mode = %s",
3811 array(
"text",
"text"),
3812 array($a_account,
"default"));
3813 if($usr = $ilDB->fetchAssoc(
$res))
3815 return $usr[
"login"];
3828 $r = $ilDB->query(
"SELECT count(*) AS cnt, auth_mode FROM usr_data ".
3829 "GROUP BY auth_mode");
3831 while($cnt = $ilDB->fetchAssoc($r))
3833 $cnt_arr[$cnt[
"auth_mode"]] = $cnt[
"cnt"];
3850 $q =
"SELECT * FROM usr_data WHERE ".
3851 " email = %s AND (auth_mode = %s ";
3852 $types = array(
"text",
"text");
3853 $values = array($a_email,
"local");
3855 if ($ilSetting->get(
"auth_mode") == 1)
3857 $q.=
" OR auth_mode = %s";
3859 $values[] =
"default";
3865 $usr_set = $ilDB->queryF($q, $types, $values);
3866 while ($usr_rec = $ilDB->fetchAssoc($usr_set))
3868 $users[$usr_rec[
"usr_id"]] = $usr_rec[
"login"];
3885 $image_dir = $webspace_dir.
"/usr_images";
3886 $store_file =
"usr_".$obj_id.
".".
"jpg";
3887 $target_file = $image_dir.
"/$store_file";
3889 chmod($tmp_file, 0770);
3893 $show_file =
"$image_dir/usr_".$obj_id.
".jpg";
3894 $thumb_file =
"$image_dir/usr_".$obj_id.
"_small.jpg";
3895 $xthumb_file =
"$image_dir/usr_".$obj_id.
"_xsmall.jpg";
3896 $xxthumb_file =
"$image_dir/usr_".$obj_id.
"_xxsmall.jpg";
3926 $a_prevent_no_photo_image =
false)
3931 $res = $ilDB->queryF(
"SELECT * FROM usr_pref WHERE ".
3932 "keyword IN (%s,%s) ".
3934 array(
"text",
"text",
"integer"),
3935 array(
'public_upload',
'public_profile', $a_usr_id));
3936 while (
$row = $ilDB->fetchAssoc(
$res))
3938 switch (
$row[
'keyword'])
3940 case 'public_upload' :
3941 $upload =
$row[
'value'] ==
'y';
3943 case 'public_profile' :
3944 $profile = (
$row[
'value'] ==
'y' ||
3945 $row[
'value'] ==
'g');
3952 if(defined(
'ILIAS_MODULE'))
3954 $webspace_dir = (
'.'.$webspace_dir);
3956 $webspace_dir .= (
'./'.ilUtil::getWebspaceDir());
3958 $image_dir = $webspace_dir.
"/usr_images";
3960 if ($a_size ==
'big')
3962 $thumb_file = $image_dir.
"/usr_".$a_usr_id.
".jpg";
3966 $thumb_file = $image_dir.
"/usr_".$a_usr_id.
"_".$a_size.
".jpg";
3970 if((($upload && $profile) || $a_force_pic)
3971 && @is_file($thumb_file))
3973 $file = $thumb_file.
"?t=".rand(1, 99999);
3977 if (!$a_prevent_no_photo_image)
3992 $image_dir = $webspace_dir.
"/usr_images";
3993 $file = $image_dir.
"/usr_".$this->getID().
".".
"jpg";
3994 $thumb_file = $image_dir.
"/usr_".$this->getID().
"_small.jpg";
3995 $xthumb_file = $image_dir.
"/usr_".$this->getID().
"_xsmall.jpg";
3996 $xxthumb_file = $image_dir.
"/usr_".$this->getID().
"_xxsmall.jpg";
3997 $upload_file = $image_dir.
"/upload_".$this->getID();
4000 $this->
setPref(
"profile_image",
"");
4003 if (@is_file(
$file))
4007 if (@is_file($thumb_file))
4009 unlink($thumb_file);
4011 if (@is_file($xthumb_file))
4013 unlink($xthumb_file);
4015 if (@is_file($xxthumb_file))
4017 unlink($xxthumb_file);
4019 if (@is_file($upload_file))
4021 unlink($upload_file);
4028 if(!is_array($a_data))
4032 foreach($a_data as $field =>
$data)
4034 #$new_data[$field] = ilUtil::stripSlashes($data);
4036 $this->user_defined_data[
'f_'.$field] =
$data;
4038 #$this->user_defined_data = $new_data;
4045 return $this->user_defined_data ? $this->user_defined_data : array();
4054 $field_def = array();
4056 include_once(
"./Services/User/classes/class.ilUserDefinedData.php");
4059 foreach($this->user_defined_data as $field => $value)
4061 if($field !=
'usr_id')
4064 $udata->set($field, $value);
4096 include_once(
"./Services/User/classes/class.ilUserDefinedData.php");
4108 $this->user_defined_data = $udata->getAll();
4132 include_once(
"./Services/User/classes/class.ilUserDefinedData.php");
4150 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
4151 include_once
'classes/class.ilFormat.php';
4153 global
$lng,$rbacreview;
4155 $language =& $a_language;
4156 $language->loadLanguageModule(
'registration');
4157 $language->loadLanguageModule(
'crs');
4160 $body .= ($language->txt(
"login").
": ".$this->
getLogin().
"\n");
4164 $body .= ($language->txt(
"title").
": ".$this->
getUTitle().
"\n");
4169 $language->txt(
'gender_m') :
4170 $language->txt(
'gender_f');
4171 $body .= ($language->txt(
"gender").
": ".
$gender.
"\n");
4175 $body .= ($language->txt(
"firstname").
": ".$this->
getFirstname().
"\n");
4179 $body .= ($language->txt(
"lastname").
": ".$this->
getLastname().
"\n");
4183 $body .= ($language->txt(
"institution").
": ".$this->
getInstitution().
"\n");
4187 $body .= ($language->txt(
"department").
": ".$this->
getDepartment().
"\n");
4191 $body .= ($language->txt(
"street").
": ".$this->
getStreet().
"\n");
4195 $body .= ($language->txt(
"city").
": ".$this->
getCity().
"\n");
4199 $body .= ($language->txt(
"zipcode").
": ".$this->
getZipcode().
"\n");
4203 $body .= ($language->txt(
"country").
": ".$this->
getCountry().
"\n");
4211 $body .= ($language->txt(
"phone_office").
": ".$this->
getPhoneOffice().
"\n");
4215 $body .= ($language->txt(
"phone_home").
": ".$this->
getPhoneHome().
"\n");
4219 $body .= ($language->txt(
"phone_mobile").
": ".$this->
getPhoneMobile().
"\n");
4221 if(strlen($this->
getFax()))
4223 $body .= ($language->txt(
"fax").
": ".$this->
getFax().
"\n");
4227 $body .= ($language->txt(
"email").
": ".$this->
getEmail().
"\n");
4231 $body .= ($language->txt(
"hobby").
": ".$this->
getHobby().
"\n");
4235 $body .= ($language->txt(
"referral_comment").
": ".$this->
getComment().
"\n");
4239 $body .= ($language->txt(
"matriculation").
": ".$this->
getMatriculation().
"\n");
4248 $body .= ($language->txt(
"create_date").
": ".$date.
"\n");
4251 foreach($rbacreview->getGlobalRoles() as $role)
4253 if($rbacreview->isAssigned($this->getId(),$role))
4260 $body .= ($language->txt(
'reg_role_info').
': '.implode(
',',$gr).
"\n");
4266 $body .= ($language->txt(
'time_limit').
": ".$language->txt(
'crs_unlimited').
"\n");
4279 $body .= $language->txt(
'time_limit').
': '.$start->get(
IL_CAL_DATETIME);
4280 $body .= $language->txt(
'time_limit').
': '.$end->get(
IL_CAL_DATETIME);
4283 #$body .= $language->txt('time_limit').': '.$period;
4296 $var =
"im_".$a_im_type;
4297 $this->$var = $a_im_id;
4302 $var =
"im_".$a_im_type;
4308 $this->delicious = $a_delicious;
4325 $set = $ilDB->queryF(
"SELECT feed_hash from usr_data WHERE usr_id = %s",
4326 array(
"integer"), array($a_user_id));
4327 if ($rec = $ilDB->fetchAssoc($set))
4329 if (strlen($rec[
"feed_hash"]) == 32)
4331 return $rec[
"feed_hash"];
4335 $hash = md5(rand(1,9999999) + str_replace(
" ",
"", (
string) microtime()));
4336 $ilDB->manipulateF(
"UPDATE usr_data SET feed_hash = %s".
4337 " WHERE usr_id = %s",
4338 array(
"text",
"integer"),
4339 array($hash, $a_user_id));
4374 ($a_password==
"") ?
"" : md5($a_password));
4390 $q =
"SELECT DISTINCT login, usr_id FROM usr_data ".
4393 $values[] = $a_login;
4395 if ($a_user_id != 0)
4397 $q.=
" AND usr_id != %s ";
4398 $types[] =
"integer";
4399 $values[] = $a_user_id;
4402 $r = $ilDB->queryF($q, $types, $values);
4404 if (
$row = $ilDB->fetchAssoc($r))
4406 return $row[
'usr_id'];
4425 $res = $ilDB->queryF(
"SELECT * FROM usr_data ".
4426 "WHERE ext_account = %s AND auth_mode = %s",
4427 array(
"text",
"text"),
4428 array($a_external_account, $a_auth_mode));
4429 return $ilDB->fetchAssoc(
$res) ?
true :
false;
4440 global
$ilDB, $rbacreview;
4443 $ids = $rbacreview->assignedUsers($role_id);
4445 if (count ($ids) == 0)
4450 $query =
"SELECT usr_data.*, usr_pref.value AS language
4452 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4453 WHERE ".$ilDB->in(
"usr_data.usr_id", $ids,
false,
"integer");
4454 $values[] =
"language";
4460 $query .=
" AND usr_data.active = %s";
4462 $types[] =
"integer";
4465 $query .=
" ORDER BY usr_data.lastname, usr_data.firstname ";
4467 $r = $ilDB->queryF(
$query, $types, $values);
4469 while (
$row = $ilDB->fetchAssoc($r))
4485 $query =
"SELECT usr_data.*, usr_pref.value AS language FROM usr_data LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id and usr_pref.keyword = %s WHERE 1 = 1 ";
4487 $values[] =
"language";
4491 $query .=
" AND usr_data.active = %s";
4493 $types[] =
"integer";
4498 $query.=
" AND usr_data.time_limit_owner = %s";
4500 $types[] =
"integer";
4503 $query .=
" AND usr_data.usr_id != %s ";
4504 $values[] = ANONYMOUS_USER_ID;
4505 $types[] =
"integer";
4507 $query .=
" ORDER BY usr_data.lastname, usr_data.firstname ";
4509 $result = $ilDB->queryF(
$query, $types, $values);
4511 while (
$row = $ilDB->fetchAssoc($result))
4538 global $rbacadmin, $rbacreview,
$ilDB;
4542 foreach ($a_mem_ids as $mem_id) {
4543 $ids [] = $ilDB->quote($mem_id);
4546 $query =
"SELECT usr_data.*, usr_pref.value AS language
4548 LEFT JOIN usr_pref ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4549 WHERE ".$ilDB->in(
"usr_data.usr_id", $ids,
false,
"integer").
"
4550 AND usr_data.usr_id != %s";
4551 $values[] =
"language";
4553 $values[] = ANONYMOUS_USER_ID;
4554 $types[] =
"integer";
4558 $query .=
" AND active = %s";
4560 $types[] =
"integer";
4565 $query.=
" AND usr_data.time_limit_owner = %s";
4566 $values[] = $timelimitowner;
4567 $types[] =
"integer";
4571 $query .=
" ORDER BY usr_data.lastname, usr_data.firstname ";
4573 $result = $ilDB->queryF(
$query, $types, $values);
4574 while (
$row = $ilDB->fetchAssoc($result))
4579 return $mem_arr ? $mem_arr : array();
4593 if (is_array($a_internalids)) {
4594 foreach ($a_internalids as $internalid) {
4595 if (is_numeric ($internalid))
4597 $ids[] = $internalid;
4602 if (is_numeric($parsedid) && $parsedid > 0)
4609 if (count($ids) == 0)
4612 $query =
"SELECT usr_data.*, usr_pref.value AS language
4615 ON usr_pref.usr_id = usr_data.usr_id AND usr_pref.keyword = %s
4616 WHERE ".$ilDB->in(
"usr_data.usr_id", $ids,
false,
"integer");
4617 $values[] =
"language";
4620 $query .=
" ORDER BY usr_data.lastname, usr_data.firstname ";
4623 $result = $ilDB->queryF(
$query, $types, $values);
4624 while (
$row = $ilDB->fetchAssoc($result))
4643 $r = $ilDB->queryF(
"SELECT * FROM usr_pref WHERE usr_id = %s",
4644 array(
"integer"), array($user_id));
4646 while(
$row = $ilDB->fetchAssoc($r))
4659 $query =
"UPDATE usr_data SET usr_data.login_attempts = 0 WHERE usr_data.usr_id = %s";
4660 $affected = $ilDB->manipulateF(
$query, array(
'integer'), array($a_usr_id) );
4662 if($affected)
return true;
4670 $query =
"SELECT usr_data.login_attempts FROM usr_data WHERE usr_data.usr_id = %s";
4671 $result = $ilDB->queryF(
$query, array(
'integer'), array($a_usr_id) );
4672 $record = $ilDB->fetchAssoc( $result );
4682 $query =
"UPDATE usr_data SET usr_data.login_attempts = (usr_data.login_attempts + 1) WHERE usr_data.usr_id = %s";
4683 $affected = $ilDB->manipulateF(
$query, array(
'integer'), array($a_usr_id) );
4685 if($affected)
return true;
4693 $query =
"UPDATE usr_data SET usr_data.active = 0 WHERE usr_data.usr_id = %s";
4694 $affected = $ilDB->manipulateF(
$query, array(
'integer'), array($a_usr_id) );
4696 if($affected)
return true;
4706 return in_array($this->
getPref(
"public_profile"), array(
"y",
"g"));
4729 $res = $ilDB->queryF(
'SELECT * FROM loginname_history WHERE usr_id = %s AND login = %s AND history_date = %s',
4730 array(
'integer',
'text',
'integer'),
4733 if( $ilDB->numRows(
$res) == 0 )
4735 $ilDB->manipulateF(
'
4736 INSERT INTO loginname_history
4737 (usr_id, login, history_date)
4738 VALUES (%s, %s, %s)',
4739 array(
'integer',
'text',
'integer'),
4758 $atime = $pd_set->get(
"user_activity_time") * 60;
4761 if ($a_user_id == 0)
4763 $where =
"WHERE user_id != 0 AND NOT agree_date IS NULL ";
4764 $type_array = array(
"integer");
4765 $val_array = array(time());
4769 $where =
"WHERE user_id = %s ";
4770 $type_array = array(
"integer",
"integer");
4771 $val_array = array($a_user_id, time());
4774 $no_anonym = ($a_no_anonymous)
4775 ?
"AND user_id <> ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer").
" "
4778 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
4781 include_once
'./Services/User/classes/class.ilUserFilter.php';
4788 $r = $ilDB->queryF($q =
"SELECT count(user_id) as num,user_id,firstname,lastname,title,login,last_login,max(ctime) AS ctime ".
4789 "FROM usr_session ".
4790 "LEFT JOIN usr_data u ON user_id = u.usr_id ".
4791 "LEFT JOIN usr_pref p ON (p.usr_id = u.usr_id AND p.keyword = ".
4792 $ilDB->quote(
"hide_own_online_status",
"text").
") ".$where.
4793 "AND expires > %s ".
4794 "AND (p.value IS NULL OR NOT p.value = ".$ilDB->quote(
"y",
"text").
") ".
4797 "GROUP BY user_id,firstname,lastname,title,login,last_login ".
4798 "ORDER BY lastname, firstname", $type_array, $val_array);
4800 while ($user = $ilDB->fetchAssoc($r))
4803 || $user[
"ctime"] + $atime > $ctime)
4805 $users[$user[
"user_id"]] = $user;
4809 return $users ? $users : array();
4825 $atime = $pd_set->get(
"user_activity_time") * 60;
4827 $no_anonym = ($a_no_anonymous)
4828 ?
"AND user_id <> ".$ilDB->quote(ANONYMOUS_USER_ID,
"integer").
" "
4835 $q =
"SELECT DISTINCT dat.obj_id as obj_id ".
4837 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4838 "JOIN object_reference r1 ON r1.ref_id = fa.parent ".
4839 "JOIN tree ON tree.child = r1.ref_id ".
4840 "JOIN object_reference r2 ON r2.ref_id = tree.parent ".
4841 "JOIN object_data dat ON dat.obj_id = r2.obj_id ".
4842 "WHERE ua.usr_id = ".$ilDB->quote($a_user_id,
"integer").
" ".
4843 "AND fa.assign = ".$ilDB->quote(
"y",
"text").
" ".
4844 "AND dat.type IN (".$ilDB->quote(
"crs",
"text").
",".
4845 $ilDB->quote(
"grp",
"text").
")";
4846 $r = $ilDB->query($q);
4848 while (
$row = $ilDB->fetchAssoc($r))
4850 $groups_and_courses_of_user[] =
$row[
"obj_id"];
4853 if (count($groups_and_courses_of_user) == 0)
4855 $q =
"SELECT count(user_id) as num,ctime,user_id,firstname,lastname,title,login,last_login ".
4856 "FROM usr_session ".
4857 "JOIN usr_data ON user_id=usr_id ".
4858 "WHERE user_id = ".$ilDB->quote($a_user_id,
"integer").
" ".
4860 " AND NOT agree_date IS NULL ".
4861 "AND expires > ".$ilDB->quote(time(),
"integer").
" ".
4862 "GROUP BY user_id,ctime,firstname,lastname,title,login,last_login";
4863 $r = $ilDB->query($q);
4867 $q =
"SELECT count(user_id) as num,s.ctime,s.user_id,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4868 "FROM usr_session s ".
4869 "JOIN usr_data ud ON ud.usr_id = s.user_id ".
4870 "JOIN rbac_ua ua ON ua.usr_id = s.user_id ".
4871 "JOIN rbac_fa fa ON fa.rol_id = ua.rol_id ".
4872 "JOIN tree ON tree.child = fa.parent ".
4873 "JOIN object_reference or1 ON or1.ref_id = tree.parent ".
4874 "JOIN object_data od ON od.obj_id = or1.obj_id ".
4875 "LEFT JOIN usr_pref p ON (p.usr_id = ud.usr_id AND p.keyword = ".
4876 $ilDB->quote(
"hide_own_online_status",
"text").
") ".
4877 "WHERE s.user_id != 0 ".
4879 "AND (p.value IS NULL OR NOT p.value = ".$ilDB->quote(
"y",
"text").
") ".
4880 "AND s.expires > ".$ilDB->quote(time(),
"integer").
" ".
4881 "AND fa.assign = ".$ilDB->quote(
"y",
"text").
" ".
4882 " AND NOT ud.agree_date IS NULL ".
4883 "AND ".$ilDB->in(
"od.obj_id", $groups_and_courses_of_user,
false,
"integer").
" ".
4884 "GROUP BY s.user_id,s.ctime,ud.firstname,ud.lastname,ud.title,ud.login,ud.last_login ".
4885 "ORDER BY ud.lastname, ud.firstname";
4886 $r = $ilDB->query($q);
4889 while ($user = $ilDB->fetchAssoc($r))
4892 || $user[
"ctime"] + $atime > $ctime)
4894 $users[$user[
"user_id"]] = $user;
4898 return $users ? $users : array();
4915 $hashcode = substr(md5(uniqid(rand(),
true)), 0, 16);
4917 $res = $ilDB->queryf(
'
4918 SELECT COUNT(usr_id) cnt FROM usr_data
4919 WHERE reg_hash = %s',
4924 if(
$row->cnt > 0) $continue =
true;
4928 if($continue)
continue;
4930 $ilDB->manipulateF(
'
4934 array(
'text',
'integer'),
4935 array($hashcode, (
int)$a_usr_id)
4957 $res = $ilDB->queryf(
'
4958 SELECT usr_id, create_date FROM usr_data
4959 WHERE reg_hash = %s',
4962 while(
$row = $ilDB->fetchAssoc(
$res))
4964 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
4967 if((
int)$oRegSettigs->getRegistrationHashLifetime() != 0 &&
4968 time() - (int)$oRegSettigs->getRegistrationHashLifetime() > strtotime(
$row[
'create_date']))
4970 require_once
'Services/Registration/exceptions/class.ilRegConfirmationLinkExpiredException.php';
4974 $ilDB->manipulateF(
'
4978 array(
'text',
'integer'),
4979 array(
'', (
int)
$row[
'usr_id'])
4982 return (
int)$row[
'usr_id'];
4985 require_once
'Services/Registration/exceptions/class.ilRegistrationHashNotFoundException.php';
4991 if (strlen($a_birthday))
4998 $this->birthday = null;
5017 if( !(
int)$period )
throw new ilException(
'no valid period given');
5021 $date = date(
'Y-m-d H:i:s', (time() - ((
int)$period * 24 * 60 * 60)) );
5023 $query =
"SELECT usr_id FROM usr_data WHERE last_login < %s";
5025 $res = $ilDB->queryF(
$query, array(
'timestamp'), array($date));
5030 $ids[] =
$row->usr_id;
5047 if($a_last_login !== null) $last_login = $a_last_login;
5048 else $last_login = date(
'Y-m-d H:i:s');
5052 $query =
"UPDATE usr_data SET usr_data.last_login = %s WHERE usr_data.usr_id = %s";
5053 $affected = $ilDB->manipulateF(
$query, array(
'timestamp',
'integer'), array($last_login, $a_usr_id) );
5055 if($affected)
return $last_login;
5063 $query =
"UPDATE object_data SET owner = 0 ".
5064 "WHERE owner = ".$ilDB->quote($this->
getId(),
'integer');
5081 $q =
"SELECT DISTINCT ".$ilDB->upper($ilDB->substr(
"lastname", 1, 1)).
" let FROM usr_data ORDER BY let";
5082 $let_set = $ilDB->query($q);
5085 while ($let_rec = $ilDB->fetchAssoc($let_set))
5087 $let[$let_rec[
"let"]] = $let_rec[
"let"];