function updateUserSuperAdmin($idUser, $name, $md5password, $password1, $email_contact, $userLevel1) { $pACL = new paloACL($this->_DB); $arrUser = $pACL->getUsers($idUser); if ($arrUser === false || count($arrUser) == 0 || !isset($idUser)) { $this->errMsg = _tr("User dosen't exist"); return false; } if ($userLevel1 != "superadmin") { $this->errMsg = _tr("You aren't authorized to perform this action"); return false; } $this->_DB->beginTransaction(); //actualizamos la informacion de usuario que esta en la tabla acl_user if ($pACL->updateUserName($idUser, $name)) { if ($pACL->setUserProp($idUser, "email_contact", $email_contact, "email")) { //actualizamos el password del usuario if ($password1 !== "") { if ($pACL->changePassword($idUser, $md5password)) { $this->_DB->commit(); return true; } else { $error = _tr("Password couldn't be updated") . " " . $pACL->errMsg; $this->_DB->rollBack(); return false; } } else { $this->_DB->commit(); return true; } } else { $error = _tr("Can't set email contact.") . " " . $pACL->errMsg; $this->_DB->rollBack(); return false; } } else { $error = _tr("User couldn't be update.") . " " . $pACL->errMsg; $this->_DB->rollBack(); return false; } }