2require_once(
'./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
3require_once(
'./Services/User/classes/class.ilObjUser.php');
35 $shibUser =
new self();
37 $ext_id = $shibUser->shibServerData->getLogin();
38 $shibUser->setExternalAccount($ext_id);
39 $existing_usr_id = self::getUsrIdByExtId($ext_id);
40 if ($existing_usr_id) {
41 $shibUser->setId($existing_usr_id);
44 $shibUser->setAuthMode(
'shibboleth');
52 if ($shibConfig->getUpdateFirstname()) {
55 if ($shibConfig->getUpdateLastname()) {
58 if ($shibConfig->getUpdateGender()) {
61 if ($shibConfig->getUpdateTitle()) {
64 if ($shibConfig->getUpdateInstitution()) {
67 if ($shibConfig->getUpdateDepartment()) {
70 if ($shibConfig->getUpdateStreet()) {
73 if ($shibConfig->getUpdateZipcode()) {
76 if ($shibConfig->getUpdateCountry()) {
79 if ($shibConfig->getUpdatePhoneOffice()) {
82 if ($shibConfig->getUpdatePhoneHome()) {
85 if ($shibConfig->getUpdatePhoneMobile()) {
88 if ($shibConfig->getUpdateFax()) {
91 if ($shibConfig->getUpdateMatriculation()) {
94 if ($shibConfig->getUpdateEmail()) {
97 if ($shibConfig->getUpdateHobby()) {
100 if ($shibConfig->getUpdateLanguage()) {
154 while (self::loginExists(
$login, $this->
getId())) {
155 $login = $login_tmp . $appendix;
167 return (
bool)($this->
getId() == 0);
177 $name = strtolower(strtr(utf8_decode($name), utf8_decode(
'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'),
'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'));
190 private static function loginExists(
$login, $usr_id) {
195 $query =
'SELECT usr_id FROM usr_data WHERE login = ' .
$ilDB->quote(
$login,
'text');
196 $query .=
' AND usr_id != ' .
$ilDB->quote($usr_id,
'integer');
207 protected static function getUsrIdByExtId($ext_id) {
212 $query =
'SELECT usr_id FROM usr_data WHERE ext_account = ' .
$ilDB->quote($ext_id,
'text');
214 if (
$ilDB->numRows($a_set) == 0) {
217 $usr =
$ilDB->fetchObject($a_set);
setLanguage($a_str)
set user language @access public
setInstitution($a_str)
set institution @access public
setFirstname($a_str)
set firstname @access public
$login
all user related data in single vars @access public
setDepartment($a_str)
set department @access public
getLastname()
get lastname @access public
setExternalAccount($a_str)
set external account
setLogin($a_str)
set login / username @access public
setTimeLimitFrom($a_from)
getEmail()
get email address @access public
setCountry($a_str)
Set country (free text)
setPasswd($a_str, $a_type=IL_PASSWD_PLAIN)
set password @access public
setPhoneHome($a_str)
set home phone @access public
setFax($a_str)
set fax @access public
setTimeLimitUntil($a_until)
setTimeLimitOwner($a_owner)
getFirstname()
get firstname @access public
setZipcode($a_str)
set zipcode @access public
getLogin()
get login / username @access public
setLastname($a_str)
set lastame @access public
setStreet($a_str)
set street @access public
setActive($a_active, $a_owner=0)
set user active state and updates system fields appropriately @access public
setGender($a_str)
set gender @access public
setTimeLimitUnlimited($a_unlimited)
setEmail($a_str)
set email @access public
getFullname($a_max_strlen=0)
get fullname @access public
setMatriculation($a_str)
set matriculation number @access public
setPhoneOffice($a_str)
set office phone @access public
setPhoneMobile($a_str)
set mobile phone @access public
setTitle($a_title)
set object title
setDescription($a_desc)
set object description
getId()
get object id @access public
Class for user related exception handling in ILIAS.
static generatePasswords($a_number)
Generate a number of passwords.
static buildInstance(shibServerData $shibServerData)
static getInstance(shibServerData $shibServerData)