예제 #1
0
 public function performAction()
 {
     if (!($user = AuthService::getInstance()->getUser())) {
         throw new \Exception('Authenticated user required');
     }
     parent::performAction();
 }
예제 #2
0
 public function performAction()
 {
     if ($user = AuthService::getInstance()->getUser()) {
         $this->response->addContent('Hello, ' . $user->urlName . ' ');
         $this->response->addContent(new Anchor('Sign out', $this->io->makeAnchor(SignOut::createState())));
     }
     //else {
     $this->response->addContent(new Anchor('vk auth', $this->io->makeAnchor(VkAuth::createState())));
     //}
     if (null === $this->action) {
         $this->response->error("Page not found");
         return;
     }
     parent::performAction();
 }