Bugfix: Fix email address saving.

This commit is contained in:
Starbeamrainbowlabs 2017-02-10 19:58:16 +00:00
parent 23a2e24238
commit 21e49fb87a
3 changed files with 5 additions and 5 deletions

View File

@ -3844,8 +3844,8 @@ register_module([
$content .= "<label for='username'>Username:</label>\n";
$content .= "<input type='text' name='username' value='$env->user' readonly />\n";
$content .= "<form method='post' action='?action=save-preferences'>\n";
$content .= " <label for='email'>Email Address:</label>\n";
$content .= " <input type='email' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
$content .= " <label for='email-address'>Email Address:</label>\n";
$content .= " <input type='email' id='email-address' name='email-address' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
$content .= " <p><small>Used to send you notifications etc. Never shared with anyone except $settings->admindetails_name, $settings->sitename's administrator.</small></p>\n";
$content .= " <input type='submit' value='Save Preferences' />\n";
$content .= "</form>\n";

View File

@ -104,7 +104,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting pople do things like change their email address and password.",
"id": "feature-user-preferences",
"lastupdate": 1486756068,
"lastupdate": 1486756657,
"optional": false
},
{

View File

@ -52,8 +52,8 @@ register_module([
$content .= "<label for='username'>Username:</label>\n";
$content .= "<input type='text' name='username' value='$env->user' readonly />\n";
$content .= "<form method='post' action='?action=save-preferences'>\n";
$content .= " <label for='email'>Email Address:</label>\n";
$content .= " <input type='email' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
$content .= " <label for='email-address'>Email Address:</label>\n";
$content .= " <input type='email' id='email-address' name='email-address' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
$content .= " <p><small>Used to send you notifications etc. Never shared with anyone except $settings->admindetails_name, $settings->sitename's administrator.</small></p>\n";
$content .= " <input type='submit' value='Save Preferences' />\n";
$content .= "</form>\n";