private function getTokenDataFromCache()
 {
     $key = self::$prefix_accessToken . $this->token;
     $res = Memcache::instance()->get($key);
     if ($res) {
         return $res;
     } else {
         return array();
     }
 }
示例#2
0
 public function __construct(\Libs\Cache\MemcacheIdentityObject $memidobj)
 {
     $this->memcache = Memcache::instance();
     $this->memIdentityObject = $memidobj;
 }
示例#3
0
 public function checkSLogin()
 {
     if (empty($this->s_ticket)) {
         return FALSE;
     }
     $this->session = Memcache::instance()->get($this->s_ticket);
     if (!empty($this->session)) {
         if ($this->session && $this->session['user_id']) {
             $this->session['login_type'] = 2;
             $this->session['login_from'] = $this->login_from;
             return TRUE;
         }
     }
     return FALSE;
 }
示例#4
0
 private function getUserInfo()
 {
     if (!$this->user_id) {
         return '';
     }
     $key_info = self::$prefix_userinfo . $this->user_id;
     $key_mob = self::$prefix_mobile . $this->user_id;
     $userInfo = Memcache::instance()->get($key_info);
     if (!$userInfo) {
         $userInfo = \Libs\Util\Users::getInstance()->getUserInfo($this->user_id);
         Memcache::instance()->set($key_info, $userInfo, 300);
     }
     $mob_info = Memcache::instance()->get($key_mob);
     if (!$mob_info) {
         $mob_info = \Libs\Util\Users::getInstance()->getUserMobile($this->user_id);
         if (!$mob_info) {
             $mob_info = 'empty';
         }
         Memcache::instance()->set($key_mob, $mob_info, 300);
     }
     $this->email = $userInfo['email'];
     $this->is_actived = $userInfo['is_actived'];
     $this->nickname = $userInfo['nickname'];
     $this->regTime = $userInfo['ctime'];
     $this->reg_from = $userInfo['reg_from'];
     if ($mob_info != 'empty') {
         $this->mobile = $mob_info['mobile'];
     }
 }