Compare commits

..

4 Commits

2 changed files with 7 additions and 6 deletions

View File

@@ -1 +1 @@
9.3.2 9.3.4

View File

@@ -231,8 +231,6 @@ class Login
) { ) {
// attach db class // attach db class
$this->db = $db; $this->db = $db;
// log login data for this class only
$log->setLogFlag(\CoreLibs\Logging\Logger\Flag::per_class);
// attach logger // attach logger
$this->log = $log; $this->log = $log;
// attach session class // attach session class
@@ -1060,9 +1058,9 @@ class Login
]; ];
// set the default unit // set the default unit
if ($res['edit_default']) { if ($res['edit_default']) {
$_SESSION['UNIT_DEFAULT'] = $res['edit_access_id']; $_SESSION['UNIT_DEFAULT'] = (int)$res['edit_access_id'];
} }
$_SESSION['UNIT_UID'][$res['uid']] = $res['edit_access_id']; $_SESSION['UNIT_UID'][$res['uid']] = (int)$res['edit_access_id'];
// sub arrays for simple access // sub arrays for simple access
array_push($eauid, $res['edit_access_id']); array_push($eauid, $res['edit_access_id']);
$unit_acl[$res['edit_access_id']] = $res['level']; $unit_acl[$res['edit_access_id']] = $res['level'];
@@ -2347,7 +2345,10 @@ HTML;
is_array($_SESSION['UNIT']) && is_array($_SESSION['UNIT']) &&
!array_key_exists($edit_access_id, $_SESSION['UNIT']) !array_key_exists($edit_access_id, $_SESSION['UNIT'])
) { ) {
return $_SESSION['UNIT_DEFAULT'] ?? null; $edit_access_id = null;
if (is_numeric($_SESSION['UNIT_DEFAULT'])) {
$edit_access_id = (int)$_SESSION['UNIT_DEFAULT'];
}
} }
return $edit_access_id; return $edit_access_id;
} }