ILIAS  Release_5_0_x_branch Revision 61816
 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 ()
 setAllowedDomains ($a_value)
 getAllowedDomains ()
 validate ()
 save ()
 __read ()

Data Fields

const ERR_UNKNOWN_RCP = 1
const ERR_MISSING_RCP = 2
const REG_HASH_LIFETIME_MIN_VALUE = 60

Private Attributes

 $registration_type
 $password_generation_enabled
 $access_limitation
 $approve_recipient_logins
 $approve_recipient_ids
 $role_type
 $unknown
 $reg_hash_life_time = 0
 $reg_allow_codes = false
 $allowed_domains

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 59132 2015-05-04 15:11:32Z gitmgr

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

Member Function Documentation

ilRegistrationSettings::__read ( )

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

References ilObjUser\_lookupLogin(), and setAllowedDomains().

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);
$this->setAllowedDomains($ilias->getSetting('reg_allowed_domains'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRegistrationSettings::_lookupRegistrationType ( )

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

References IL_REG_DISABLED.

Referenced by ilStartUpGUI\showRegistrationLinks().

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

+ Here is the caller graph for this function:

ilRegistrationSettings::activationEnabled ( )

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

References IL_REG_ACTIVATION.

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

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

References IL_REG_APPROVE.

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

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

References IL_REG_ROLES_EMAIL.

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

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

References IL_REG_DIRECT.

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

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

References IL_REG_DISABLED.

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

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

References $access_limitation.

ilRegistrationSettings::getAllowCodes ( )

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

References $reg_allow_codes.

ilRegistrationSettings::getAllowedDomains ( )

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

References $allowed_domains.

{
return (array)$this->allowed_domains;
}
ilRegistrationSettings::getApproveRecipientLogins ( )

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

References $approve_recipient_logins.

Referenced by validate().

+ Here is the caller graph for this function:

ilRegistrationSettings::getApproveRecipients ( )

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

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

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

{
return max($this->reg_hash_life_time, self::REG_HASH_LIFETIME_MIN_VALUE);
}
ilRegistrationSettings::getRegistrationType ( )

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

References $registration_type.

Referenced by validate().

+ Here is the caller graph for this function:

ilRegistrationSettings::getUnknown ( )

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

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

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

References __read().

{
$this->__read();
}

+ Here is the call graph for this function:

ilRegistrationSettings::passwordGenerationEnabled ( )
ilRegistrationSettings::registrationCodeRequired ( )

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

References IL_REG_CODES.

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

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

References IL_REG_ROLES_FIXED.

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

Definition at line 234 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);
$ilias->setSetting('reg_allowed_domains',implode(';', $this->allowed_domains));
return true;
}
ilRegistrationSettings::setAccessLimitation (   $a_access_limitation)

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

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

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

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

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

Referenced by __read().

{
$a_value = explode(";", trim($a_value));
$this->allowed_domains = $a_value;
}

+ Here is the caller graph for this function:

ilRegistrationSettings::setApproveRecipientLogins (   $a_rec_string)

Definition at line 124 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 109 of file class.ilRegistrationSettings.php.

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

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

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

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

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

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

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

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

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

{
$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::$access_limitation
private

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

Referenced by getAccessLimitation().

ilRegistrationSettings::$allowed_domains
private

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

Referenced by getAllowedDomains().

ilRegistrationSettings::$approve_recipient_ids
private

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

ilRegistrationSettings::$approve_recipient_logins
private

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

Referenced by getApproveRecipientLogins().

ilRegistrationSettings::$password_generation_enabled
private

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

Referenced by passwordGenerationEnabled().

ilRegistrationSettings::$reg_allow_codes = false
private

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

Referenced by getAllowCodes().

ilRegistrationSettings::$reg_hash_life_time = 0
private

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

ilRegistrationSettings::$registration_type
private

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

Referenced by getRegistrationType().

ilRegistrationSettings::$role_type
private

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

ilRegistrationSettings::$unknown
private

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

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().

const ilRegistrationSettings::REG_HASH_LIFETIME_MIN_VALUE = 60

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