Refactoring of user management (ui)
This commit is contained in:
@@ -19,27 +19,15 @@ class Config extends Base
|
||||
{
|
||||
$this->response->html($this->template->layout('config_index', array(
|
||||
'db_size' => $this->config->getDatabaseSize(),
|
||||
'user' => $_SESSION['user'],
|
||||
'user_projects' => $this->project->getAvailableList($this->acl->getUserId()),
|
||||
'notifications' => $this->notification->readSettings($this->acl->getUserId()),
|
||||
'languages' => $this->config->getLanguages(),
|
||||
'values' => $this->config->getAll(),
|
||||
'errors' => array(),
|
||||
'menu' => 'config',
|
||||
'title' => t('Settings'),
|
||||
'timezones' => $this->config->getTimezones(),
|
||||
'remember_me_sessions' => $this->authentication->backend('rememberMe')->getAll($this->acl->getUserId()),
|
||||
'last_logins' => $this->lastLogin->getAll($this->acl->getUserId()),
|
||||
)));
|
||||
}
|
||||
|
||||
public function notifications()
|
||||
{
|
||||
$values = $this->request->getValues();
|
||||
$this->notification->saveSettings($this->acl->getUserId(), $values);
|
||||
$this->response->redirect('?controller=config#notifications');
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and save settings
|
||||
*
|
||||
@@ -64,17 +52,12 @@ class Config extends Base
|
||||
|
||||
$this->response->html($this->template->layout('config_index', array(
|
||||
'db_size' => $this->config->getDatabaseSize(),
|
||||
'user' => $_SESSION['user'],
|
||||
'user_projects' => $this->project->getAvailableList($this->acl->getUserId()),
|
||||
'notifications' => $this->notification->readSettings($this->acl->getUserId()),
|
||||
'languages' => $this->config->getLanguages(),
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
'menu' => 'config',
|
||||
'title' => t('Settings'),
|
||||
'timezones' => $this->config->getTimezones(),
|
||||
'remember_me_sessions' => $this->authentication->backend('rememberMe')->getAll($this->acl->getUserId()),
|
||||
'last_logins' => $this->lastLogin->getAll($this->acl->getUserId()),
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -115,16 +98,4 @@ class Config extends Base
|
||||
$this->session->flash(t('All tokens have been regenerated.'));
|
||||
$this->response->redirect('?controller=config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a "RememberMe" token
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function removeRememberMeToken()
|
||||
{
|
||||
$this->checkCSRFParam();
|
||||
$this->authentication->backend('rememberMe')->remove($this->request->getIntegerParam('id'));
|
||||
$this->response->redirect('?controller=config&action=index#remember-me');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user