/** * User logins method * * @return void */ public function logins() { if (null === $this->request->getPath(1)) { Response::redirect($this->request->getBasePath()); } else { if ($this->request->isPost()) { $user = Table\Users::findById($this->request->getPath(1)); if (isset($user->id)) { $user->logins = null; $user->update(); } $typeId = null !== $this->request->getQuery('type_id') ? '/index/' . $this->request->getQuery('type_id') : null; Response::redirect($this->request->getBasePath() . $typeId); } else { $this->prepareView('logins.phtml', array('assets' => $this->project->getAssets(), 'acl' => $this->project->getService('acl'), 'phireNav' => $this->project->getService('phireNav'))); $user = new Model\User(); $user->getLoginsById($this->request->getPath(1)); $this->view->set('title', $this->view->i18n->__('Users') . ' ' . $this->view->separator . ' ' . $user->type_name . ' ' . $this->view->separator . ' ' . $this->view->i18n->__('Logins') . ' ' . $this->view->separator . ' ' . $user->username)->set('typeId', $user->type_id)->set('table', $user->table); $this->send(); } } }