Exemple #1
0
 public function removeAction()
 {
     $service = $this->dispatcher->getParam('service');
     $user = UserModels\Login::getCurrentUser();
     if (!$user) {
         throw new Exception\UnauthorizedException('User not login');
     }
     $oauthManager = new OAuthManager();
     try {
         $oauthManager->unbindUserOAuth($user['id'], $service);
     } catch (\Exception $e) {
         $this->showException($e);
     }
     return $this->redirectHandler('/mine/oauth');
 }