From a04ecbde778decfdea7200806a6b1144861ae05f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 19 Apr 2014 22:12:12 -0400 Subject: Add RememberMe feature and authentications history --- controllers/config.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'controllers/config.php') diff --git a/controllers/config.php b/controllers/config.php index 0adf1d54..527c8a4c 100644 --- a/controllers/config.php +++ b/controllers/config.php @@ -28,7 +28,9 @@ class Config extends Base 'errors' => array(), 'menu' => 'config', 'title' => t('Settings'), - 'timezones' => $this->config->getTimezones() + 'timezones' => $this->config->getTimezones(), + 'remember_me_sessions' => $this->rememberMe->getAll($this->acl->getUserId()), + 'last_logins' => $this->lastLogin->getAll($this->acl->getUserId()), ))); } @@ -63,7 +65,9 @@ class Config extends Base 'errors' => $errors, 'menu' => 'config', 'title' => t('Settings'), - 'timezones' => $this->config->getTimezones() + 'timezones' => $this->config->getTimezones(), + 'remember_me_sessions' => $this->rememberMe->getAll($this->acl->getUserId()), + 'last_logins' => $this->lastLogin->getAll($this->acl->getUserId()), ))); } @@ -101,4 +105,15 @@ 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->rememberMe->remove($this->request->getIntegerParam('id')); + $this->response->redirect('?controller=config&action=index#remember-me'); + } } -- cgit v1.2.3