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