Skip to content

Commit e0c9b5c

Browse files
author
Webslice
committed
Check explicitly for session username, fixes #5389
1 parent 3aa3932 commit e0c9b5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interface/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
709709

710710
if($diff_num > 0) {
711711
$diffstr = serialize($diffrec_full);
712-
if(isset($_SESSION)) {
712+
if(!empty($_SESSION['s']['user']['username'])) {
713713
$username = $_SESSION['s']['user']['username'];
714714
} else {
715715
$username = 'admin';

server/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
709709

710710
if($diff_num > 0) {
711711
$diffstr = serialize($diffrec_full);
712-
if(isset($_SESSION)) {
712+
if(!empty($_SESSION['s']['user']['username'])) {
713713
$username = $_SESSION['s']['user']['username'];
714714
} else {
715715
$username = 'admin';

0 commit comments

Comments
 (0)