summaryrefslogtreecommitdiff
path: root/controllers/config.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-19 22:12:12 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-19 22:12:12 -0400
commita04ecbde778decfdea7200806a6b1144861ae05f (patch)
treee4670e3013734d9c7bd201f5d6ef1fbaae13d3b5 /controllers/config.php
parent5aacb6a76351889a6ec5ed01c8e80f139c2b2027 (diff)
Add RememberMe feature and authentications history
Diffstat (limited to 'controllers/config.php')
-rw-r--r--controllers/config.php19
1 files changed, 17 insertions, 2 deletions
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');
+ }
}