includes/sessions.php
changeset 815 c2b3b1464224
parent 811 5c807fe77020
child 826 dcf5381ce8ba
equal deleted inserted replaced
814:7664d7d38a4a 815:c2b3b1464224
   120    */
   120    */
   121   
   121   
   122   var $reg_time;
   122   var $reg_time;
   123   
   123   
   124   /**
   124   /**
   125    * MD5 hash of the current user's password, if applicable
       
   126    * @var string OR bool false
       
   127    */
       
   128    
       
   129   var $password_hash;
       
   130   
       
   131   /**
       
   132    * The number of unread private messages this user has.
   125    * The number of unread private messages this user has.
   133    * @var int
   126    * @var int
   134    */
   127    */
   135   
   128   
   136   var $unread_pms = 0;
   129   var $unread_pms = 0;
   441         
   434         
   442         $this->sid = $_COOKIE['sid'];
   435         $this->sid = $_COOKIE['sid'];
   443         $this->user_logged_in = true;
   436         $this->user_logged_in = true;
   444         $this->user_id =       intval($userdata['user_id']);
   437         $this->user_id =       intval($userdata['user_id']);
   445         $this->username =      $userdata['username'];
   438         $this->username =      $userdata['username'];
   446         $this->password_hash = $userdata['password'];
       
   447         $this->user_level =    intval($userdata['user_level']);
   439         $this->user_level =    intval($userdata['user_level']);
   448         $this->real_name =     $userdata['real_name'];
   440         $this->real_name =     $userdata['real_name'];
   449         $this->email =         $userdata['email'];
   441         $this->email =         $userdata['email'];
   450         $this->unread_pms =    $userdata['num_pms'];
   442         $this->unread_pms =    $userdata['num_pms'];
   451         $this->user_title =    ( isset($userdata['user_title']) ) ? $userdata['user_title'] : null;
   443         $this->user_title =    ( isset($userdata['user_title']) ) ? $userdata['user_title'] : null;
  1486    * @return string, or bool false if access denied
  1478    * @return string, or bool false if access denied
  1487    */
  1479    */
  1488    
  1480    
  1489   function grab_password_hash()
  1481   function grab_password_hash()
  1490   {
  1482   {
  1491     if(!$this->password_hash) return false;
  1483     return false;
  1492     return $this->password_hash;
       
  1493   }
  1484   }
  1494   
  1485   
  1495   /**
  1486   /**
  1496    * Destroys the user's password MD5 in memory
  1487    * Destroys the user's password MD5 in memory
  1497    */
  1488    */