1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander
2022-03-15 21:33:18 +01:00
8 changed files with 87 additions and 20 deletions

View File

@@ -76,10 +76,12 @@ class ucp_activate
if ($update_password)
{
$sql_ary = array(
'user_actkey' => '',
'user_password' => $user_row['user_newpasswd'],
'user_newpasswd' => '',
'user_login_attempts' => 0,
'user_actkey' => '',
'user_password' => $user_row['user_newpasswd'],
'user_newpasswd' => '',
'user_login_attempts' => 0,
'reset_token' => '',
'reset_token_expiration' => 0,
);
$sql = 'UPDATE ' . USERS_TABLE . '
@@ -101,8 +103,14 @@ class ucp_activate
user_active_flip('activate', $user_row['user_id']);
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_actkey = ''
$sql_ary = [
'user_actkey' => '',
'reset_token' => '',
'reset_token_expiration' => 0,
];
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE user_id = {$user_row['user_id']}";
$db->sql_query($sql);

View File

@@ -352,7 +352,7 @@ class ucp_register
$config['require_activation'] == USER_ACTIVATION_SELF ||
$config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
{
$user_actkey = gen_rand_string(mt_rand(6, 10));
$user_actkey = strtolower(gen_rand_string(32));
$user_type = USER_INACTIVE;
$user_inactive_reason = INACTIVE_REGISTER;
$user_inactive_time = time();