fix: [internal] Review user logins fix

pull/9473/head
Jakub Onderka 2024-01-03 18:41:47 +01:00
parent 3aa078d9bc
commit f5db800875
1 changed files with 4 additions and 2 deletions

View File

@ -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'] === "") {