2 require_once(
'./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
3 require_once(
'./Services/User/classes/class.ilObjUser.php');
24 $shibUser =
new self();
26 $ext_id = $shibUser->shibServerData->getLogin();
27 $shibUser->setExternalAccount($ext_id);
28 $existing_usr_id = self::getUsrIdByExtId($ext_id);
29 if ($existing_usr_id) {
30 $shibUser->setId($existing_usr_id);
33 $shibUser->setAuthMode(
'shibboleth');
41 if ($shibConfig->getUpdateFirstname()) {
44 if ($shibConfig->getUpdateLastname()) {
47 if ($shibConfig->getUpdateGender()) {
50 if ($shibConfig->getUpdateTitle()) {
53 if ($shibConfig->getUpdateInstitution()) {
56 if ($shibConfig->getUpdateDepartment()) {
59 if ($shibConfig->getUpdateStreet()) {
62 if ($shibConfig->getUpdateZipcode()) {
65 if ($shibConfig->getUpdateCountry()) {
68 if ($shibConfig->getUpdatePhoneOffice()) {
71 if ($shibConfig->getUpdatePhoneHome()) {
74 if ($shibConfig->getUpdatePhoneMobile()) {
77 if ($shibConfig->getUpdateFax()) {
80 if ($shibConfig->getUpdateMatriculation()) {
83 if ($shibConfig->getUpdateEmail()) {
86 if ($shibConfig->getUpdateHobby()) {
89 if ($shibConfig->getUpdateLanguage()) {
145 while (self::loginExists(
$login, $this->
getId())) {
146 $login = $login_tmp . $appendix;
158 return (
bool)($this->
getId() == 0);
168 $name = strtolower(strtr(utf8_decode($name), utf8_decode(
'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'),
'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'));
180 private static function loginExists(
$login, $usr_id) {
182 $ilDB = $DIC[
'ilDB'];
186 $query =
'SELECT usr_id FROM usr_data WHERE login = ' .
$ilDB->quote(
$login,
'text');
187 $query .=
' AND usr_id != ' .
$ilDB->quote($usr_id,
'integer');
198 protected static function getUsrIdByExtId($ext_id) {
200 $ilDB = $DIC[
'ilDB'];
204 $query =
'SELECT usr_id FROM usr_data WHERE ext_account = ' .
$ilDB->quote($ext_id,
'text');
206 if (
$ilDB->numRows($a_set) == 0) {
209 $usr =
$ilDB->fetchObject($a_set);
Class for user related exception handling in ILIAS.
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately public
setInstitution($a_str)
set institution public
getLogin()
get login / username public
setDepartment($a_str)
set department public
getFirstname()
get firstname public
setLanguage($a_str)
set user language public
$login
all user related data in single vars public
setTimeLimitOwner($a_owner)
static generatePasswords($a_number)
Generate a number of passwords.
setLastname($a_str)
set lastame public
setCountry($a_str)
Set country (free text)
setPhoneHome($a_str)
set home phone public
setTimeLimitUnlimited($a_unlimited)
setTitle($a_title)
set object title
setZipcode($a_str)
set zipcode public
setEmail($a_str)
set email public
setPasswd($a_str, $a_type=IL_PASSWD_PLAIN)
set password public
setTimeLimitUntil($a_until)
setLogin($a_str)
set login / username public
getEmail()
get email address public
getLastname()
get lastname public
setExternalAccount($a_str)
set external account
getId()
get object id public
setHobby($a_str)
set hobby public
setMatriculation($a_str)
set matriculation number public
static buildInstance(shibServerData $shibServerData)
setGender($a_str)
set gender public
setTimeLimitFrom($a_from)
setPhoneOffice($a_str)
set office phone public
getFullname($a_max_strlen=0)
get fullname public
setFirstname($a_str)
set firstname public
setFax($a_str)
set fax public
setDescription($a_desc)
set object description
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
setStreet($a_str)
set street public
setPhoneMobile($a_str)
set mobile phone public