From 01bb61f8d8a5628cbefe1d9c54fb3a7d2524e818 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 22 Nov 2023 08:13:54 +0000 Subject: [PATCH] Remove guest id when guest login fails --- php/classes/UserMgr.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/classes/UserMgr.php b/php/classes/UserMgr.php index f137098..6237ecf 100644 --- a/php/classes/UserMgr.php +++ b/php/classes/UserMgr.php @@ -294,7 +294,7 @@ class UserMgr $init_res = $this->paramMgr->init(); $this->baseExtXml = new DomDocument("1.0"); - + if ($init_res['success']) { // USERWSDIR.'RemoteParams.xml' exists // check/change access rights $basesWS = $this->paramMgr->xmlDom->getElementsByTagName('dataCenter'); // RemoteParams.xml @@ -565,6 +565,12 @@ class UserMgr $loginCommd = "DDHtmlLogin ".$this->user." ".$this->passwd." ".$this->IP; system($loginCommd, $res); + + if ($this->isGuest && ($res != 0)) { + $guest = new Guest($this->user); + $guest->deleteGuest(); + } + return $res; } -- libgit2 0.21.2