last login time not this login time

This commit is contained in:
xisi 2014-01-29 03:55:51 -05:00
parent 74dec2796d
commit 56ad9266d3

View File

@ -142,10 +142,10 @@ class User extends Base {
}
if ($this->checkUserPassword($username, $password)) {
$uid = $this->getUserId($username);
$lastLoginTime = $this->getLastLogin($uid);
$this->updateLoginTimestamp($uid);
$getIPAddress = $this->getUserIp($uid);
$setIPAddress = $this->setUserIp($uid, $_SERVER['REMOTE_ADDR']);
$lastLoginTime = $this->getLastLogin($uid);
$this->createSession($username, $getIPAddress, $lastLoginTime);
if ($setIPAddress) {
// send a notification if success_login is active