When the "Hide password" checkbox in the SMTP authentication is checked and the settings are saved, the checkbox disappears.
This makes some sense, but there is no normal way even for the administrator to get it back. That is a break of a fundamental rule of user interface design that, to the best of my knowledge, is not broken anywhere else in Drupal. New admins may try out the checkbox, only to find that they cannot get the system back to what it was before.
I propose to leave the checkbox in place for administrators or at the very least for the first administrator, user 0.
An absolutely minimal "solution" to this problem would be a warning at the checkbox that, once checked, it will disappear forever, but I would find that only somewhat better than the current design, but still not fully acceptable.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | phpmailer.unhide-password.6.patch | 2.65 KB | sun |
| #5 | phpmailer.unhide-password.5.patch | 2.4 KB | sun |
| #1 | 851072-unhide-password.patch | 2.58 KB | smk-ka |
Comments
Comment #1
smk-ka commentedHm, that feature was thought as a security measure, to not let anybody see the mail server password. Unfortunately this means unhiding for anybody would defeat the whole purpose, so here's a patch just for the proposed idea to let the super admin restore the default setting. Don't know if we need more warnings than now, though (made permanent bold and added a note about super admin).
Comment #2
smk-ka commentedComment #3
sunThe if condition could be the value of the #access property, to always have the submitted form value and not trigger a PHP notice...?
Powered by Dreditor.
Comment #4
smk-ka commentedEh, what? Where does this trigger a notice? We're not hiding any form element, so I'm not sure where #access could help us either?
Comment #5
sunBy only conditionally adding the 'smtp_hide_password' element to the form, there will not be a key nor value for it in $form_state['values']. Hence,
tries to access an array key that does not exist. By using #access, the value is always set.
Tweaked that and also the #description in attached patch.
Comment #6
sunThat condition in the submit handler wasn't really obvious, so clarified it in a comment.
Comment #7
oadaeh commentedThis issue is being closed due to Drupal 6 being at the end of its life. If you feel this is still a valid issue for the Drupal 7 compatible branch of this module, feel free to re-open this issue and provide updated information.