X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=gui%2Fbaculum%2Fprotected%2FWeb%2FPortlets%2FUsers.php;h=74d86360797dfad5ad1ea1c3470ea33bf63d1f37;hb=1561541e22ccd3331819d4b253ebfd9b12a523ef;hp=265ae880968a8dd87a47218bcedfc88f71d15d06;hpb=defcf9a3eb3c2655fef28380b34b1d2bded8a947;p=bacula%2Fbacula diff --git a/gui/baculum/protected/Web/Portlets/Users.php b/gui/baculum/protected/Web/Portlets/Users.php index 265ae88096..74d8636079 100644 --- a/gui/baculum/protected/Web/Portlets/Users.php +++ b/gui/baculum/protected/Web/Portlets/Users.php @@ -21,17 +21,16 @@ */ -Prado::using('System.Web.UI.WebControls.TConditional'); +Prado::using('System.Web.UI.ActiveControls.TActiveRepeater'); Prado::using('Application.Web.Portlets.Portlets'); class Users extends Portlets { public $web_config; - public function onInit($param) { - parent::onInit($param); + public function __construct() { + parent::__construct(); $this->web_config = $this->getModule('web_config')->getConfig(); - $this->setUsers(); } public function setUsers() { @@ -68,6 +67,7 @@ class Users extends Portlets { if(!$_SESSION['admin']) { return; } + $this->UsersList->ActiveControl->EnableUpdate = true; list($action, $user, $value) = explode(';', $param->CallbackParameter, 3); switch($action) { case 'newuser': @@ -96,6 +96,10 @@ class Users extends Portlets { case 'rmuser': { if ($user != $_SERVER['PHP_AUTH_USER']) { $this->getModule('basic_webuser')->removeUser($user); + if (array_key_exists('users', $this->web_config) && array_key_exists($user, $this->web_config['users'])) { + unset($this->web_config['users'][$user]); + } + $this->getModule('web_config')->setConfig($this->web_config); $this->setUsers(); } break;