Commit 01bb61f8d8a5628cbefe1d9c54fb3a7d2524e818

Authored by Benjamin Renard
1 parent a8ad438a

Remove guest id when guest login fails

Showing 1 changed file with 7 additions and 1 deletions   Show diff stats
php/classes/UserMgr.php
... ... @@ -294,7 +294,7 @@ class UserMgr
294 294 $init_res = $this->paramMgr->init();
295 295  
296 296 $this->baseExtXml = new DomDocument("1.0");
297   -
  297 +
298 298 if ($init_res['success']) { // USERWSDIR.'RemoteParams.xml' exists
299 299 // check/change access rights
300 300 $basesWS = $this->paramMgr->xmlDom->getElementsByTagName('dataCenter'); // RemoteParams.xml
... ... @@ -565,6 +565,12 @@ class UserMgr
565 565  
566 566 $loginCommd = "DDHtmlLogin ".$this->user." ".$this->passwd." ".$this->IP;
567 567 system($loginCommd, $res);
  568 +
  569 + if ($this->isGuest && ($res != 0)) {
  570 + $guest = new Guest($this->user);
  571 + $guest->deleteGuest();
  572 + }
  573 +
568 574  
569 575 return $res;
570 576 }
... ...