Public Member Functions

ilRegistrationSettings Class Reference
[Services/Registration]

Class ilObjAuthSettingsGUI. More...

Public Member Functions

 ilRegistrationSettings ()
 getRegistrationType ()
 setRegistrationType ($a_type)
 _lookupRegistrationType ()
 enabled ()
 directEnabled ()
 approveEnabled ()
 passwordGenerationEnabled ()
 setPasswordGenerationStatus ($a_status)
 setApproveRecipientLogins ($a_rec_string)
 getApproveRecipientLogins ()
 getApproveRecipients ()
 getUnknown ()
 roleSelectionEnabled ()
 automaticRoleAssignmentEnabled ()
 setRoleType ($a_type)
 validate ()
 save ()
 __read ()

Detailed Description

Class ilObjAuthSettingsGUI.

Author:
Stefan Meyer <smeyer@databay.de>
Version:
Id:
class.ilRegistrationSettings.php 11790 2006-08-06 17:02:20Z akill

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


Member Function Documentation

ilRegistrationSettings::__read (  ) 

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

References $id, $ilias, 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->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 59 of file class.ilRegistrationSettings.php.

References $ilias.

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::approveEnabled (  ) 

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

        {
                return $this->registration_type == IL_REG_APPROVE;
        }

ilRegistrationSettings::automaticRoleAssignmentEnabled (  ) 

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

        {
                return $this->role_type == IL_REG_ROLES_EMAIL;
        }

ilRegistrationSettings::directEnabled (  ) 

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

        {
                return $this->registration_type == IL_REG_DIRECT;
        }

ilRegistrationSettings::enabled (  ) 

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

        {
                return $this->registration_type != IL_REG_DISABLED;
        }

ilRegistrationSettings::getApproveRecipientLogins (  ) 

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

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

ilRegistrationSettings::getRegistrationType (  ) 

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

        {
                return $this->registration_type;
        }

ilRegistrationSettings::getUnknown (  ) 

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

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

ilRegistrationSettings::ilRegistrationSettings (  ) 

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

References __read().

        {
                $this->__read();
        }

Here is the call graph for this function:

ilRegistrationSettings::passwordGenerationEnabled (  ) 

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

        {
                return $this->password_generation_enabled;
        }

ilRegistrationSettings::roleSelectionEnabled (  ) 

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

        {
                return $this->role_type == IL_REG_ROLES_FIXED;
        }

ilRegistrationSettings::save (  ) 

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

References $ilias.

        {
                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)));

                return true;
        }

ilRegistrationSettings::setApproveRecipientLogins ( a_rec_string  ) 

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

        {
                $this->password_generation_enabled = $a_status;
        }

ilRegistrationSettings::setRegistrationType ( a_type  ) 

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

        {
                $this->registration_type = $a_type;
        }

ilRegistrationSettings::setRoleType ( a_type  ) 

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

        {
                $this->role_type = $a_type;
        }

ilRegistrationSettings::validate (  ) 

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

References ilObjUser::_lookupId(), and getApproveRecipientLogins().

        {
                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;
                        }
                }
                return count($this->unknown) ? 1 : 0;
        }

Here is the call graph for this function:


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