forked from Wavyzz/dolibarr
Update admin.lib.php (#35246)
Fix PHP Error: Undefined array key "login" (/admin/tools/listsessions.php:161) The error is triggered when the user name conatins '_' or '.' Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -1111,7 +1111,7 @@ function listOfSessions()
|
||||
$idsess = $tmp[1];
|
||||
$regs = array();
|
||||
$arrayofSessions[$idsess]["login"] = '';
|
||||
$loginfound = preg_match('/dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"/i', $sessValues, $regs);
|
||||
$loginfound = preg_match('/dol_login\|s:[0-9]+:"([^"]+)"/i', $sessValues, $regs);
|
||||
if ($loginfound) {
|
||||
$arrayofSessions[$idsess]["login"] = (string) $regs[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user