Пример #1
0
 public function execute()
 {
     $action = LoginAction::newFromContext($this->getContext());
     $action->doAction();
     $error = $action->getError();
     if (!$error) {
         $data = $action->getData();
         if ($data) {
             $this->redirect(swarmpath('project/' . $data['id']));
         }
     }
     $this->setAction($action);
     $this->content = $this->initContent();
 }
Пример #2
0
 public function execute()
 {
     $action = LoginAction::newFromContext($this->getContext());
     $action->doAction();
     $error = $action->getError();
     if (!$error) {
         $data = $action->getData();
         if ($data["status"] === "logged-in") {
             $this->redirect(swarmpath("user/" . $data["username"]));
         }
     }
     $this->setAction($action);
     $this->content = $this->initContent();
 }