aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-10-10 17:34:28 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-10-10 17:34:28 +0000
commiteaec8182879a4efe6eff436ebe0592632a321f7a (patch)
tree330c9f00cf17943d49645fc826f38a601450e1b5
parente5a8bda3ff47536c7ab49106ed7b8b0bbc15e4fb (diff)
downloadforums-eaec8182879a4efe6eff436ebe0592632a321f7a.tar
forums-eaec8182879a4efe6eff436ebe0592632a321f7a.tar.gz
forums-eaec8182879a4efe6eff436ebe0592632a321f7a.tar.bz2
forums-eaec8182879a4efe6eff436ebe0592632a321f7a.tar.xz
forums-eaec8182879a4efe6eff436ebe0592632a321f7a.zip
Added Send New Password functions + added check for current password when changing
git-svn-id: file:///svn/phpbb/trunk@1156 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/profile.php15
-rw-r--r--phpBB/templates/subSilver/profile_add_body.tpl4
2 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php
index 07bb40a8a4..fa108eee96 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -460,7 +460,8 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$username = (!empty($HTTP_POST_VARS['username'])) ? trim(strip_tags($HTTP_POST_VARS['username'])) : "";
$email = (!empty($HTTP_POST_VARS['email'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['email']))) : "";
- $password = (!empty($HTTP_POST_VARS['password'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['password']))) : "";
+ $password_current = (!empty($HTTP_POST_VARS['cur_password'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['cur_password']))) : "";
+ $password = (!empty($HTTP_POST_VARS['new_password'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['new_password']))) : "";
$password_confirm = (!empty($HTTP_POST_VARS['password_confirm'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['password_confirm']))) : "";
$icq = (!empty($HTTP_POST_VARS['icq'])) ? trim(strip_tags($HTTP_POST_VARS['icq'])) : "";
@@ -549,7 +550,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$row = $db->sql_fetchrow($result);
- if( $row['user_password'] != $password )
+ if( $row['user_password'] != $password_current )
{
$error = TRUE;
$error_msg = $lang['Current_password_mismatch'];
@@ -1451,6 +1452,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
+ "SITENAME" => $board_config['sitename'],
"USERNAME" => $username,
"PASSWORD" => $user_password,
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
@@ -1552,6 +1554,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
+ "SITENAME" => $board_config['sitename'],
"USERNAME" => $username,
"PASSWORD" => $password_confirm,
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']))
@@ -1559,10 +1562,18 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$emailer->send();
$emailer->reset();
+ $template->assign_vars(array(
+ "META" => '<meta http-equiv="refresh" content="5;url=index.' . $phpEx . '">')
+ );
+
message_die(GENERAL_MESSAGE, $lang['Account_active_admin']);
}
else
{
+ $template->assign_vars(array(
+ "META" => '<meta http-equiv="refresh" content="5;url=index.' . $phpEx . '">')
+ );
+
$message = ( $sql_update_pass == "" ) ? $lang['Account_active'] : $lang['Password_activated'];
message_die(GENERAL_MESSAGE, $message);
}
diff --git a/phpBB/templates/subSilver/profile_add_body.tpl b/phpBB/templates/subSilver/profile_add_body.tpl
index e6cb19b575..c07cd0b97e 100644
--- a/phpBB/templates/subSilver/profile_add_body.tpl
+++ b/phpBB/templates/subSilver/profile_add_body.tpl
@@ -29,7 +29,7 @@
<td class="row1"><span class="gen">{L_CURRENT_PASSWORD}: *</span><br />
<span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td>
<td class="row2">
- <input type="password" class="post" style="width: 200px" name="password" size="25" maxlength="100" value="{PASSWORD}" />
+ <input type="password" class="post" style="width: 200px" name="cur_password" size="25" maxlength="100" value="{PASSWORD}" />
</td>
</tr>
<!-- END edit_profile -->
@@ -37,7 +37,7 @@
<td class="row1"><span class="gen">{L_NEW_PASSWORD}: *</span><br />
<span class="gensmall">{L_PASSWORD_IF_CHANGED}</span></td>
<td class="row2">
- <input type="password" class="post" style="width: 200px" name="password" size="25" maxlength="100" value="{PASSWORD}" />
+ <input type="password" class="post" style="width: 200px" name="new_password" size="25" maxlength="100" value="{PASSWORD}" />
</td>
</tr>
<tr>