Changeset 298 for trunk/Framework
- Timestamp:
- 04/24/08 23:40:36 (9 months ago)
- Files:
-
- trunk/Framework/User/ToasterAdmin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Framework/User/ToasterAdmin.php
r242 r298 3 3 * Framework_User_ToasterAdmin 4 4 * 5 * @package ToasterAdmin 6 * @copyright 2005-2006 Bill Shupp 7 * @author Bill Shupp <hostmaster@shupp.org> 8 * @license GPL 2.0 {@link http://www.gnu.org/licenses/gpl.txt} 5 * PHP Version 5.2.0+ 6 * 7 * @uses Net_Vpopmaild 8 * @category Mail 9 * @package ToasterAdmin 10 * @author Bill Shupp <hostmaster@shupp.org> 11 * @copyright 2008 Bill Shupp 12 * @license GPL 2.0 {@link http://www.gnu.org/licenses/gpl.txt} 13 * @link {http://trac.merchbox.com/trac/toasteradmin 9 14 */ 10 11 15 /** 12 * 13 * Extension of Net_Vpopmaild 14 * 15 * @author Bill Shupp <hostmaster@shupp.org> 16 * @package ToasterAdmin 17 * @version 1.0 18 * 16 * Framework_User_ToasterAdmin 17 * 18 * Provides access to vpopmail, as well as authentication for Framework 19 * 20 * @uses Net_Vpopmaild 21 * @category Mail 22 * @package ToasterAdmin 23 * @author Bill Shupp <hostmaster@shupp.org> 24 * @copyright 2008 Bill Shupp 25 * @license GPL 2.0 {@link http://www.gnu.org/licenses/gpl.txt} 26 * @link {http://trac.merchbox.com/trac/toasteradmin 19 27 */ 20 class Framework_User_ToasterAdmin extends Net_Vpopmaild {21 28 class Framework_User_ToasterAdmin extends Net_Vpopmaild 29 { 22 30 /** 23 31 * __construct 24 32 * 25 * @access protected 33 * @access public 34 * @throws Framework_Exception 26 35 * @return void 27 36 */ 28 function __construct() { 37 public function __construct() 38 { 29 39 $this->userID = null; 30 40 parent::__construct(); … … 43 53 } 44 54 45 46 public function isDefault() { 47 55 /** 56 * isDefault 57 * 58 * @access public 59 * @return bool false if the user is authenticated, true if not (default user) 60 */ 61 public function isDefault() 62 { 48 63 $session =& Framework_Session::singleton(); 49 64 if (is_null($session->email)) { … … 51 66 } 52 67 // Check timeout 53 $time = time();68 $time = time(); 54 69 $lastActionTime = $session->lastActionTime; 55 $timeLimit = (int)Framework::$site->config->inactiveTimeout;70 $timeLimit = (int)Framework::$site->config->inactiveTimeout; 56 71 $this->recordio("timeout info: time: $time, lastActionTime: $lastActionTime, timeLimit: $timeLimit"); 57 72 if (($time - $lastActionTime) > $timeLimit) {
