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; }
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; }