Changeset 1450
- Timestamp:
- 04/24/06 17:33:25 (3 years ago)
- Files:
-
- 1 modified
-
trunk/rss/cls/user.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rss/cls/user.php
r1449 r1450 27 27 ############################################################################### 28 28 rss_require('cls/wrappers/user.php'); 29 30 define ('RSS_USER_ACTION_LOGIN',0x01); 31 define ('RSS_USER_ACTION_COOKIE',0x02); 32 define ('RSS_USER_ACTION_SESSION',0x04); 33 define ('RSS_USER_ACTION_LOGOUT',0x08); 29 34 30 35 /** … … 44 49 /** Mobile session */ 45 50 var $_mobileSession; 51 /** Action */ 52 var $_action; 46 53 47 54 /** … … 60 67 $this -> _realName = ''; 61 68 $this -> _hash = null; 62 $this -> _mobileSession = 63 isset($_POST['media']) && 'mobile' == $_POST['media']; 64 65 if ('mobile' == getThemeMedia()) { 66 ini_set('session.use_trans_sid',true); 67 session_start(); 68 } 69 70 71 $this -> _mobileSession = 72 isset($_POST['media']) && 'mobile' == $_POST['media']; 73 74 if ('mobile' == getThemeMedia()) { 75 ini_set('session.use_trans_sid',true); 76 session_start(); 77 } 69 78 70 79 if (array_key_exists('logout',$_GET)) { … … 84 93 $cuname = $_cuname; 85 94 $chash = $_chash; 95 $this -> _action = RSS_USER_ACTION_LOGIN; 86 96 } 87 97 } 88 98 elseif (isset($_COOKIE[RSS_USER_COOKIE])) { 89 99 list($cuname,$chash) = explode('|',$_COOKIE[RSS_USER_COOKIE]); 100 $this -> _action = RSS_USER_ACTION_COOKIE; 90 101 } 91 102 elseif(isset($_SESSION['mobile'])) { 92 103 list($cuname,$chash) = explode('|',$_SESSION['mobile']); 93 104 $this -> _mobileSession = true; 105 $this -> _action = RSS_USER_ACTION_SESSION; 94 106 } 95 107 if ($cuname && $chash) { … … 102 114 $userIPs = explode(' ',$tmpUserIps); 103 115 $subnet = preg_replace('#^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$#','\1',$_SERVER['REMOTE_ADDR']); 104 if ( array_search($subnet, $userIPs) !== FALSE) {116 if ((array_search($subnet, $userIPs) !== FALSE) || ($this -> _action != RSS_USER_ACTION_COOKIE)) { 105 117 $this -> _uid = $uid; 106 118 $this -> _uname = $uname;
