aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/profile.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-10-22 01:11:48 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-10-22 01:11:48 +0000
commitfa7313eb84af5dad79291a2c8d290d882854bba2 (patch)
tree8f8f82e2990ed6fe88e2e3fc2cc8edc7cf671492 /phpBB/profile.php
parentf09f5669976d0954a8bbbe61afa3093ee6a6fba5 (diff)
downloadforums-fa7313eb84af5dad79291a2c8d290d882854bba2.tar
forums-fa7313eb84af5dad79291a2c8d290d882854bba2.tar.gz
forums-fa7313eb84af5dad79291a2c8d290d882854bba2.tar.bz2
forums-fa7313eb84af5dad79291a2c8d290d882854bba2.tar.xz
forums-fa7313eb84af5dad79291a2c8d290d882854bba2.zip
Fixed bug in profile where account reactivation email had wrong link
git-svn-id: file:///svn/phpbb/trunk@1241 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/profile.php')
-rw-r--r--phpBB/profile.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php
index 8b647dbca8..12a62feead 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -951,7 +951,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
if($mode == "editprofile")
{
- if($email != $current_email && ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) )
+ if($email != $current_email && ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) && $userdata['user_level'] != ADMIN)
{
$user_active = 0;
$user_actkey = generate_activation_key();
@@ -1008,12 +1008,19 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
"USERNAME" => $username,
"EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
- "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$act_key")
+ "U_ACTIVATE" => "http://" . $server_name . $path . "/profile.$phpEx?mode=activate&act_key=$user_actkey")
);
$emailer->send();
$emailer->reset();
+
+ $message = $lang['Profile_updated_inactive'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_index'];
+
+ // Log the user out as their account is no longer active
+ if( $userdata['session_logged_in'] )
+ {
+ session_end($userdata['session_id'], $userdata['user_id']);
+ }
- $message = $lang['Profile_updated'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_index'];
}
else
@@ -1022,7 +1029,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
}
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
+ "META" => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
message_die(GENERAL_MESSAGE, $message);