summaryrefslogtreecommitdiff
path: root/app/Model/User.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
committerFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
commit9eeded33f68872515954a2fc177fcb47a9273ae9 (patch)
treef3ef9507e087ca6bf3ce624232da240a8689b051 /app/Model/User.php
parentc539bdc8ab746c5afd48cf87de057dc38d50adac (diff)
Add email notifications
Diffstat (limited to 'app/Model/User.php')
-rw-r--r--app/Model/User.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/Model/User.php b/app/Model/User.php
index b5744c44..d0e33fd0 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -340,8 +340,7 @@ class User extends Base
$this->updateSession($user);
// Update login history
- $lastLogin = new LastLogin($this->db, $this->event);
- $lastLogin->create(
+ $this->lastLogin->create(
$method,
$user['id'],
$this->getIpAddress(),
@@ -350,9 +349,8 @@ class User extends Base
// Setup the remember me feature
if (! empty($values['remember_me'])) {
- $rememberMe = new RememberMe($this->db, $this->event);
- $credentials = $rememberMe->create($user['id'], $this->getIpAddress(), $this->getUserAgent());
- $rememberMe->writeCookie($credentials['token'], $credentials['sequence'], $credentials['expiration']);
+ $credentials = $this->rememberMe->create($user['id'], $this->getIpAddress(), $this->getUserAgent());
+ $this->rememberMe->writeCookie($credentials['token'], $credentials['sequence'], $credentials['expiration']);
}
}
else {
@@ -384,8 +382,7 @@ class User extends Base
// LDAP authentication
if (! $authenticated && LDAP_AUTH) {
- $ldap = new Ldap($this->db, $this->event);
- $authenticated = $ldap->authenticate($username, $password);
+ $authenticated = $this->ldap->authenticate($username, $password);
$method = LastLogin::AUTH_LDAP;
}