예제 #1
0
 /**
  * 获得大概年前登录用户对象
  *
  * @return PwUserBo
  */
 protected function _getLoginUser()
 {
     if (!($userCookie = Pw::getCookie('winduser'))) {
         $uid = $password = '';
     } else {
         list($uid, $password) = explode("\t", Pw::decrypt($userCookie));
     }
     $user = new PwUserBo($uid);
     if (!$user->isExists() || Pw::getPwdCode($user->info['password']) != $password) {
         $user->reset();
     } else {
         unset($user->info['password']);
     }
     return $user;
 }