Update and display last seen for systems
This commit is contained in:
@@ -159,8 +159,11 @@ class Node
|
||||
// If we have challenge, then we are doing MD5
|
||||
$exp_pwd = $challenge ? $this->md5_challenge($o->session('sespass'),$challenge) : $o->session('sespass');
|
||||
|
||||
if ($exp_pwd === $password)
|
||||
if ($exp_pwd === $password) {
|
||||
$o->system->last_session = Carbon::now();
|
||||
$o->system->save();
|
||||
$this->ftns_authed->push($o);
|
||||
}
|
||||
}
|
||||
|
||||
Log::debug(sprintf('%s: = End [%d]',__METHOD__,$this->ftns_authed->count()));
|
||||
@@ -227,7 +230,11 @@ class Node
|
||||
$ftn = $this->ftns_authed->first()->ftn;
|
||||
|
||||
return $this->ftns->search(function($item) use ($ftn) {
|
||||
return $item->ftn == $ftn;
|
||||
if ($item->ftn == $ftn) {
|
||||
$item->system->last_session = Carbon::now();
|
||||
$item->system->save();
|
||||
return TRUE;
|
||||
}
|
||||
}) !== FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user