Opened 11 years ago
Last modified 10 years ago
#31682 new enhancement
reg_passmail message on login.php needs filter
| Reported by: | thomask | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Login and Registration | Version: | 4.1.1 |
| Severity: | normal | Keywords: | has-patch needs-refresh |
| Cc: | Focuses: |
Description
reg passwords is hardcoded to the login.php:
<p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
So it appears even if you do some other ways of delivering passwords. E.g. i want to first check the registrating person and then send them the password, not immediately, so i need to change this message that would reflect this, and the only option now is to filter global gettext, what is not optimal.
Proposed solution - replace this row with
<p id="reg_passmail"><?php echo apply_filters('reg_passmail',__('A password will be e-mailed to you.')) ?></p>
Attachments (1)
Change History (6)
#2
@
11 years ago
Awesome. Patched the wrong directory. I'll submit another patch in a minute, but if someone can delete that first patch, that'd be super.
Edit: @jeremyfelt removed the first useless patch. Thank you Jeremy :)
#5
@
10 years ago
A stop-gap using javascript, good while the <p> tag id remains "reg_passmail":
add_action('login_footer', 'add_reg_passmsg');
function add_reg_passmsg(){ ?>
<script type="text/javascript">document.getElementById("reg_passmail").innerHTML = "Log in info will be sent via email and a link via text.";
</script>
<?php }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This has now slightly changed, and it's, by default 'Registration confirmation will be emailed to you.'. I've just added a patch which adds a filter, and docs, to allow that message to be changed.