]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/protected/Web/Portlets/Users.php
baculum: Fix redundant loading users portlet
[bacula/bacula] / gui / baculum / protected / Web / Portlets / Users.php
index 265ae880968a8dd87a47218bcedfc88f71d15d06..788491a667bc829a53cdeb5618fe6bad11a79c8d 100644 (file)
  */
 
 
-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() {
@@ -96,6 +95,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;