Changeset 66 for trunk/lib/Auth_File.inc.php
- Timestamp:
- Feb 15, 2006 3:34:50 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_File.inc.php
r65 r66 21 21 'login_timeout' => 21600, // 6 hours. 22 22 'idle_timeout' => 3600, // 1 hour. 23 'login_url' => '/login.php', 23 24 ); 24 25 var $_users = array(); … … 173 174 App::raiseMsg(_("Your session has closed. You need to log-in again."), MSG_NOTICE, __FILE__, __LINE__); 174 175 $this->clearAuth(); 176 return false; 175 177 } 176 178 } 177 179 return false; 180 } 181 182 /** 183 * Redirect user to login page if they are not logged in. 184 * 185 * @param string $message The text description of a message to raise. 186 * @param int $type The type of message: MSG_NOTICE, 187 * MSG_SUCCESS, MSG_WARNING, or MSG_ERR. 188 * @param string $file __FILE__. 189 * @param string $line __LINE__. 190 * @access public 191 */ 192 function requireLogin($message='', $type=MSG_NOTICE, $file=null, $line=null) 193 { 194 if (!$this->isLoggedIn()) { 195 // Display message for requiring login. 196 App::raiseMsg($message, $type, $file, $line); 197 198 // Login scripts must have the same 'login' tag for boomerangURL verification/manipulation. 199 App::setBoomerangURL(absoluteMe(), 'login'); 200 App::dieURL($this->_params['login_url']); 201 } 178 202 } 179 203
Note: See TracChangeset
for help on using the changeset viewer.