示例#1
0
 public function login($token)
 {
     $this->token = $token;
     $userinfo = $this->getUserInfo();
     $userinfo['username'] = $userinfo['screen_name'];
     $userinfo['avatar'] = $userinfo['profile_image_url'];
     $user = new OAuthUser('weibo', $this->openid);
     $user->setinfo($userinfo);
     $this->setUser($user);
     return true;
 }
示例#2
0
 public function login($token)
 {
     $this->token = $token;
     if (!$this->getOpenId()) {
         return false;
     }
     $userinfo = $this->getUserInfo();
     $userinfo['username'] = $userinfo['nickname'];
     $userinfo['avatar'] = $userinfo['figureurl_qq_1'];
     $user = new OAuthUser('qq', $this->openid);
     $user->setinfo($userinfo);
     $this->setUser($user);
     return true;
 }