Changeset 2099 in ExiteCMS for trunk/includes/authentication/authentication.php
- Timestamp:
- 12/07/08 22:05:25 (3 years ago)
- File:
-
- 1 edited
-
trunk/includes/authentication/authentication.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/authentication/authentication.php
r2095 r2099 45 45 // used to store the logon status code 46 46 var $status = false; 47 48 // used to store the available logon templates 49 var $templates = array(); 47 50 48 51 // class constructor … … 139 142 140 143 // call the logoff function of the authentication method used 141 $this->classes[$this->method_used]->logoff(); 144 if ($this->method_used) { 145 $this->classes[$this->method_used]->logoff(); 146 } 142 147 143 148 // remove logon information from the session record … … 155 160 156 161 return $this->userrecord; 162 } 163 164 // get the list of templates 165 function get_templates($type = "side") { 166 167 // do we have them cached? 168 if (!isset($this->templates[$type]) || !is_array($this->templates[$type])) { 169 // define the array to store the templates for this type 170 $this->templates[$type] = array(); 171 172 // loop through the selected logon functions 173 foreach($this->selected as $method) { 174 // check if the class exists and is loaded 175 if (isset($this->methods[$method]) && is_object($this->classes[$method])) { 176 // call the get_template function of the class 177 $template = $this->classes[$method]->get_template($type); 178 // do we already have this template 179 if (!isset($this->templates[$type][$template])) { 180 if (isset($_SESSION['box_login_'.$method])) { 181 $state = $_SESSION['box_login_'.$method] == 0 ? 1 : 0; 182 } else { 183 $state = 1; 184 } 185 $this->templates[$type][$template] = array('method' => $method, 'state' => $state); 186 } 187 } 188 } 189 } 190 // return the templates 191 return $this->templates[$type]; 157 192 } 158 193
Note: See TracChangeset
for help on using the changeset viewer.
