Ejemplo n.º 1
0
 public function onChangePasswd()
 {
     if ($this->edt_new_passwd->getValue() != "" && $this->edt_new_passwd->getValue() != "admin" && $this->edt_new_passwd->getValue() == $this->edt_confirm_passwd->getValue()) {
         if (changeWspUser("admin", $this->edt_old_passwd->getValue(), $this->edt_new_passwd->getValue(), "administrator")) {
             $this->addObject(DialogBox::closeAll());
             $result_dialogbox = new DialogBox(__(CHANGE_PASSWD), __(CHANGE_PASSWD_CONGRATULATION));
         } else {
             $result_dialogbox = new DialogBox(__(CHANGE_PASSWD), __(CHANGE_PASSWD_ERROR));
         }
     } else {
         $result_dialogbox = new DialogBox(__(CHANGE_PASSWD), __(CHANGE_PASSWD_ERROR));
     }
     $result_dialogbox->activateCloseButton();
     $this->addObject($result_dialogbox);
 }
Ejemplo n.º 2
0
 public function removeWspUser($sender, $login)
 {
     $this->result_obj->emptyObject();
     if ($login != $_SESSION['wsp-login']) {
         if (changeWspUser($login, "", "", "", false, true)) {
             $this->result_obj->setClass("success");
             $this->result_obj->add(__(DEL_USER_OK, $login));
         } else {
             $this->result_obj->setClass("error");
             $this->result_obj->add(__(DEL_USER_NOT_OK, $login));
         }
     } else {
         $this->result_obj->setClass("error");
         $this->result_obj->add(__(DEL_USER_NOT_OK, $login));
     }
 }