mirror of https://github.com/MISP/MISP
fix: [internal] Review user logins fix
parent
3aa078d9bc
commit
f5db800875
|
@ -126,10 +126,12 @@ class UserLoginProfile extends AppModel
|
|||
return $this->userProfile;
|
||||
}
|
||||
|
||||
public function _fromLog($logEntry)
|
||||
public function _fromLog(array $logEntry)
|
||||
{
|
||||
$data = ["user_agent" => "", "ip" => "", "accept_lang" => "", "geoip" => "", "ua_pattern" => "", "ua_platform" => "", "ua_browser" => ""];
|
||||
$data = array_merge($data, JsonTool::decode($logEntry['change']) ?? []);
|
||||
if ($logEntry['change']) {
|
||||
$data = array_merge($data, JsonTool::decode($logEntry['change']));
|
||||
}
|
||||
$data['ip'] = $logEntry['ip'];
|
||||
$data['timestamp'] = $logEntry['created'];
|
||||
if ($data['user_agent'] === "") {
|
||||
|
|
Loading…
Reference in New Issue