Commit 97a7dcf0f48e51b59751b74b9e01aba52d77dda4

Authored by Nathanael Jourdane
1 parent 4111d47d

Create user dir if necessary when using webservices

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
php/classes/WSUserMgr.php
... ... @@ -25,6 +25,13 @@ class WSUserMgr extends UserMgr
25 25 $this->userdir = USERPATH . "/" . $this->user . "/";
26 26 $this->userMissions = $this->getAvailableMissionsByUser();
27 27  
  28 + if (!is_dir($this->userdir)) {
  29 + if (!$this->createDir()) {
  30 + die("Login for " . $this->user . " failed: Can't create WS dirs");
  31 + }
  32 + $this->isFirst = true;
  33 + }
  34 +
28 35 chmod($this->userWS, 0775);
29 36 if (isset($isSoap)) {
30 37 $this->isSoap = $isSoap;
... ...