ILIAS  Release_4_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 ()
 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 ()
 validate ()
 save ()
 __read ()

Data Fields

const ERR_UNKNOWN_RCP = 1
const ERR_MISSING_RCP = 2

Private Attributes

 $reg_hash_life_time = 0

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 21782 2009-09-21 18:31:16Z smeyer

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

Member Function Documentation

ilRegistrationSettings::__read ( )

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

References $login, and 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->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)
{
{
$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 66 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 85 of file class.ilRegistrationSettings.php.

References IL_REG_ACTIVATION.

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

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

References IL_REG_APPROVE.

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

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

References IL_REG_ROLES_EMAIL.

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

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

References IL_REG_DIRECT.

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

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

References IL_REG_DISABLED.

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

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

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

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

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

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

References $reg_hash_life_time.

ilRegistrationSettings::getRegistrationType ( )

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

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

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

References __read().

{
$this->__read();
}

+ Here is the call graph for this function:

ilRegistrationSettings::passwordGenerationEnabled ( )

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

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

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

References IL_REG_ROLES_FIXED.

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

Definition at line 198 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);
return true;
}
ilRegistrationSettings::setAccessLimitation (   $a_access_limitation)

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

{
$this->access_limitation = $a_access_limitation;
}
ilRegistrationSettings::setApproveRecipientLogins (   $a_rec_string)

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

References $login, and 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 94 of file class.ilRegistrationSettings.php.

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

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

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

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

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

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

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

Definition at line 161 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_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 47 of file class.ilRegistrationSettings.php.

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

const ilRegistrationSettings::ERR_UNKNOWN_RCP = 1

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

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


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