ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRegistrationSettings Class Reference

Class ilObjAuthSettingsGUI. More...

+ Collaboration diagram for ilRegistrationSettings:

Public Member Functions

 ilRegistrationSettings ()
 getRegistrationType ()
 setRegistrationType ($a_type)
 _lookupRegistrationType ()
 enabled ()
 directEnabled ()
 approveEnabled ()
 activationEnabled ()
 registrationCodeRequired ()
 passwordGenerationEnabled ()
 setPasswordGenerationStatus ($a_status)
 getAccessLimitation ()
 setAccessLimitation ($a_access_limitation)
 setApproveRecipientLogins ($a_rec_string)
 getApproveRecipientLogins ()
 getApproveRecipients ()
 getUnknown ()
 roleSelectionEnabled ()
 automaticRoleAssignmentEnabled ()
 setRoleType ($a_type)
 setRegistrationHashLifetime ($a_lifetime)
 getRegistrationHashLifetime ()
 setAllowCodes ($a_allow_codes)
 getAllowCodes ()
 validate ()
 save ()
 __read ()

Data Fields

const ERR_UNKNOWN_RCP = 1
const ERR_MISSING_RCP = 2

Private Attributes

 $reg_hash_life_time = 0
 $reg_allow_codes = false

Detailed Description

Class ilObjAuthSettingsGUI.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilRegistrationSettings.php 25125 2010-08-13 11:17:04Z jluetzen

Definition at line 45 of file class.ilRegistrationSettings.php.

Member Function Documentation

ilRegistrationSettings::__read ( )

Definition at line 230 of file class.ilRegistrationSettings.php.

References ilObjUser\_lookupLogin().

Referenced by ilRegistrationSettings().

{
global $ilias;
$this->registration_type = $ilias->getSetting('new_registration_type');
$this->role_type = $ilias->getSetting('reg_role_assignment',1);
$this->password_generation_enabled = $ilias->getSetting('passwd_reg_auto_generate');
$this->access_limitation = $ilias->getSetting('reg_access_limitation');
$this->reg_hash_life_time = $ilias->getSetting('reg_hash_life_time');
$this->reg_allow_codes = (bool)$ilias->getSetting('reg_allow_codes');
$this->approve_recipient_ids = unserialize(stripslashes($ilias->getSetting('approve_recipient')));
$this->approve_recipient_ids = $this->approve_recipient_ids ?
$this->approve_recipient_ids :
array();
// create login array
$tmp_logins = array();
foreach($this->approve_recipient_ids as $id)
{
if($login = ilObjUser::_lookupLogin($id))
{
$tmp_logins[] = $login;
}
}
$this->approve_recipient_logins = implode(',',$tmp_logins);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRegistrationSettings::_lookupRegistrationType ( )

Definition at line 67 of file class.ilRegistrationSettings.php.

References IL_REG_DISABLED.

Referenced by ilMainMenuGUI\setTemplateVars(), and ilStartUpGUI\showLogin().

{
global $ilias;
return $ilias->getSetting('new_registration_type',IL_REG_DISABLED);
}

+ Here is the caller graph for this function:

ilRegistrationSettings::activationEnabled ( )

Definition at line 86 of file class.ilRegistrationSettings.php.

References IL_REG_ACTIVATION.

{
return $this->registration_type == IL_REG_ACTIVATION;
}
ilRegistrationSettings::approveEnabled ( )

Definition at line 82 of file class.ilRegistrationSettings.php.

References IL_REG_APPROVE.

{
return $this->registration_type == IL_REG_APPROVE;
}
ilRegistrationSettings::automaticRoleAssignmentEnabled ( )

Definition at line 145 of file class.ilRegistrationSettings.php.

References IL_REG_ROLES_EMAIL.

{
return $this->role_type == IL_REG_ROLES_EMAIL;
}
ilRegistrationSettings::directEnabled ( )

Definition at line 78 of file class.ilRegistrationSettings.php.

References IL_REG_DIRECT.

{
return $this->registration_type == IL_REG_DIRECT;
}
ilRegistrationSettings::enabled ( )

Definition at line 74 of file class.ilRegistrationSettings.php.

References IL_REG_DISABLED.

{
return $this->registration_type != IL_REG_DISABLED;
}
ilRegistrationSettings::getAccessLimitation ( )

Definition at line 104 of file class.ilRegistrationSettings.php.

{
return $this->access_limitation;
}
ilRegistrationSettings::getAllowCodes ( )

Definition at line 173 of file class.ilRegistrationSettings.php.

References $reg_allow_codes.

ilRegistrationSettings::getApproveRecipientLogins ( )

Definition at line 128 of file class.ilRegistrationSettings.php.

Referenced by validate().

{
return $this->approve_recipient_logins;
}

+ Here is the caller graph for this function:

ilRegistrationSettings::getApproveRecipients ( )

Definition at line 132 of file class.ilRegistrationSettings.php.

{
return $this->approve_recipient_ids ? $this->approve_recipient_ids : array();
}
ilRegistrationSettings::getRegistrationHashLifetime ( )

Definition at line 161 of file class.ilRegistrationSettings.php.

References $reg_hash_life_time.

ilRegistrationSettings::getRegistrationType ( )

Definition at line 58 of file class.ilRegistrationSettings.php.

Referenced by validate().

{
return $this->registration_type;
}

+ Here is the caller graph for this function:

ilRegistrationSettings::getUnknown ( )

Definition at line 136 of file class.ilRegistrationSettings.php.

{
return implode(',',$this->unknown);
}
ilRegistrationSettings::ilRegistrationSettings ( )

Definition at line 53 of file class.ilRegistrationSettings.php.

References __read().

{
$this->__read();
}

+ Here is the call graph for this function:

ilRegistrationSettings::passwordGenerationEnabled ( )

Definition at line 95 of file class.ilRegistrationSettings.php.

{
return $this->password_generation_enabled;
}
ilRegistrationSettings::registrationCodeRequired ( )

Definition at line 90 of file class.ilRegistrationSettings.php.

References IL_REG_CODES.

{
return $this->registration_type == IL_REG_CODES;
}
ilRegistrationSettings::roleSelectionEnabled ( )

Definition at line 141 of file class.ilRegistrationSettings.php.

References IL_REG_ROLES_FIXED.

{
return $this->role_type == IL_REG_ROLES_FIXED;
}
ilRegistrationSettings::save ( )

Definition at line 215 of file class.ilRegistrationSettings.php.

{
global $ilias;
$ilias->setSetting('reg_role_assignment',$this->role_type);
$ilias->setSetting('new_registration_type',$this->registration_type);
$ilias->setSetting('passwd_reg_auto_generate',$this->password_generation_enabled);
$ilias->setSetting('approve_recipient',addslashes(serialize($this->approve_recipient_ids)));
$ilias->setSetting('reg_access_limitation',$this->access_limitation);
$ilias->setSetting('reg_hash_life_time',$this->reg_hash_life_time);
$ilias->setSetting('reg_allow_codes',$this->reg_allow_codes);
return true;
}
ilRegistrationSettings::setAccessLimitation (   $a_access_limitation)

Definition at line 109 of file class.ilRegistrationSettings.php.

{
$this->access_limitation = $a_access_limitation;
}
ilRegistrationSettings::setAllowCodes (   $a_allow_codes)

Definition at line 166 of file class.ilRegistrationSettings.php.

{
$this->reg_allow_codes = (bool)$a_allow_codes;
return $this;
}
ilRegistrationSettings::setApproveRecipientLogins (   $a_rec_string)

Definition at line 114 of file class.ilRegistrationSettings.php.

References ilObjUser\_lookupId().

{
$this->approve_recipient_logins = $a_rec_string;
$this->approve_recipient_ids = array();
// convert logins to array of ids
foreach(explode(',',trim($this->approve_recipient_logins)) as $login)
{
if($uid = ilObjUser::_lookupId(trim($login)))
{
$this->approve_recipient_ids[] = $uid;
}
}
}

+ Here is the call graph for this function:

ilRegistrationSettings::setPasswordGenerationStatus (   $a_status)

Definition at line 99 of file class.ilRegistrationSettings.php.

{
$this->password_generation_enabled = $a_status;
}
ilRegistrationSettings::setRegistrationHashLifetime (   $a_lifetime)

Definition at line 154 of file class.ilRegistrationSettings.php.

{
$this->reg_hash_life_time = $a_lifetime;
return $this;
}
ilRegistrationSettings::setRegistrationType (   $a_type)

Definition at line 62 of file class.ilRegistrationSettings.php.

{
$this->registration_type = $a_type;
}
ilRegistrationSettings::setRoleType (   $a_type)

Definition at line 149 of file class.ilRegistrationSettings.php.

{
$this->role_type = $a_type;
}
ilRegistrationSettings::validate ( )

Definition at line 178 of file class.ilRegistrationSettings.php.

References $valid, ilObjUser\_lookupId(), ERR_MISSING_RCP, ERR_UNKNOWN_RCP, getApproveRecipientLogins(), getRegistrationType(), and IL_REG_APPROVE.

{
global $ilAccess;
$this->unknown = array();
$this->mail_perm = array();
$login_arr = explode(',',$this->getApproveRecipientLogins());
$login_arr = $login_arr ? $login_arr : array();
foreach($login_arr as $recipient)
{
if(!$recipient = trim($recipient))
{
continue;
}
if(!ilObjUser::_lookupId($recipient))
{
$this->unknown[] = $recipient;
continue;
}
else
{
$valid = $recipient;
}
}
if(count($this->unknown))
{
}
if($this->getRegistrationType() == IL_REG_APPROVE and !count((array) $valid))
{
}
return 0;
}

+ Here is the call graph for this function:

Field Documentation

ilRegistrationSettings::$reg_allow_codes = false
private

Definition at line 51 of file class.ilRegistrationSettings.php.

Referenced by getAllowCodes().

ilRegistrationSettings::$reg_hash_life_time = 0
private

Definition at line 50 of file class.ilRegistrationSettings.php.

Referenced by getRegistrationHashLifetime().

const ilRegistrationSettings::ERR_MISSING_RCP = 2

Definition at line 48 of file class.ilRegistrationSettings.php.

Referenced by ilRegistrationSettingsGUI\save(), and validate().

const ilRegistrationSettings::ERR_UNKNOWN_RCP = 1

Definition at line 47 of file class.ilRegistrationSettings.php.

Referenced by ilRegistrationSettingsGUI\save(), and validate().


The documentation for this class was generated from the following file: