1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

More fixes, addresses double activation attempt

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2571 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-05-12 17:57:34 +00:00
parent 801891caea
commit 6ca24b8a9f
5 changed files with 86 additions and 74 deletions

View File

@@ -46,6 +46,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
}
$username = $row['username'];
$user_id = $row['user_id'];
$user_actkey = gen_rand_string(true);
$key_len = 54 - strlen($server_url);
@@ -54,7 +55,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
$user_password = gen_rand_string(false);
$sql = "UPDATE " . USERS_TABLE . "
SET user_newpasswd = '" .md5($user_password) . "', user_actkey = '$user_actkey'
SET user_newpasswd = '" . md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id'];
if ( !$db->sql_query($sql) )
{
@@ -77,7 +78,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
'PASSWORD' => $user_password,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . "?mode=activate&act_key=$user_actkey")
'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
);
$emailer->send();
$emailer->reset();
@@ -131,4 +132,4 @@ $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
?>