Don't update last online time and ip address when impersonating.

This commit is contained in:
flash 2023-07-28 20:43:08 +00:00
parent c5ec94289d
commit a22433f7dd

View file

@ -107,7 +107,7 @@ if($authToken->isValid()) {
if(!$userInfo->isDeleted()) { if(!$userInfo->isDeleted()) {
$userInfo->setCurrent(); $userInfo->setCurrent();
$userInfo->bumpActivity($_SERVER['REMOTE_ADDR']);
$sessions->updateSession(sessionInfo: $sessionInfo, remoteAddr: $_SERVER['REMOTE_ADDR']); $sessions->updateSession(sessionInfo: $sessionInfo, remoteAddr: $_SERVER['REMOTE_ADDR']);
if($sessionInfo->shouldBumpExpires()) if($sessionInfo->shouldBumpExpires())
$authToken->applyCookie($sessionInfo->getExpiresTime()); $authToken->applyCookie($sessionInfo->getExpiresTime());
@ -132,9 +132,7 @@ if($authToken->isValid()) {
User::unsetCurrent(); User::unsetCurrent();
} }
if(User::hasCurrent()) { if(!User::hasCurrent())
$userInfo->bumpActivity($_SERVER['REMOTE_ADDR']);
} else
AuthToken::nukeCookie(); AuthToken::nukeCookie();
} }