Some fixes:
[mailer.git] / inc / modules / admin / what-config_wernis.php
index 74770402dc4b7b16bc3ddcebafa981a62558597b..7acf89891c3005189802e1f4a4ec270992c34425 100644 (file)
@@ -44,6 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 if (isFormSent('save_config')) {
+       // Hash the password and remove clear-text
+       setPostRequestElement('wernis_pass_md5', hashSha256(postRequestElement('wernis_pass')));
+
        // First merge temporarily the new API data into the current config
        mergeConfig(postRequestArray());
 
@@ -54,8 +57,7 @@ if (isFormSent('save_config')) {
                        setPostRequestElement('wernis_' . $revert, postRequestElement('wernis_' . $revert));
                } // END - if
 
-               // Hash the password and remove clear-text
-               setPostRequestElement('wernis_pass_md5', hashSha256(postRequestElement('wernis_pass')));
+               // Remove clear password
                unsetPostRequestElement('wernis_pass');
 
                // Save settings