Line 385 | Line 385 |
---|
$user_actkey = empty($user_activation_key) ? $user_actkey : $user_activation_key; }
|
$user_actkey = empty($user_activation_key) ? $user_actkey : $user_activation_key; }
|
if ($user_row['user_type'] == USER_NORMAL || empty($user_activation_key)) { $sql = 'UPDATE ' . USERS_TABLE . " SET user_actkey = '" . $db->sql_escape($user_actkey) . "' WHERE user_id = $user_id";
| // Always update actkey even if same and also update actkey expiration to 24 hours from now $sql_ary = [ 'user_actkey' => $user_actkey, 'user_actkey_expiration' => $user::get_token_expiration(), ];
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $user_id;
|
$db->sql_query($sql);
|
$db->sql_query($sql);
|
}
| |
|
|
| // Start sending email
|
$messenger = new messenger(false);
$messenger->template($email_template, $user_row['user_lang']);
| $messenger = new messenger(false);
$messenger->template($email_template, $user_row['user_lang']);
|
Line 402 | Line 406 |
---|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])), 'USERNAME' => htmlspecialchars_decode($user_row['username']),
| 'WELCOME_MSG' => html_entity_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename']), ENT_COMPAT), 'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
|
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k=$user_actkey") );
| 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k=$user_actkey") );
|
Line 466 | Line 470 |
---|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
'USERNAME' => htmlspecialchars_decode($user_row['username']))
| 'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT))
|
);
$messenger->send(NOTIFY_EMAIL);
| );
$messenger->send(NOTIFY_EMAIL);
|
Line 822 | Line 826 |
---|
* @var string action Quick tool that should be run * @var array user_row Current user data * @var string u_action The u_action link
|
* @var string action Quick tool that should be run * @var array user_row Current user data * @var string u_action The u_action link
|
| * @var int user_id User id of the user to manage
|
* @since 3.1.0-a1 * @changed 3.2.2-RC1 Added u_action
|
* @since 3.1.0-a1 * @changed 3.2.2-RC1 Added u_action
|
| * @changed 3.2.10-RC1 Added user_id
|
*/
|
*/
|
$vars = array('action', 'user_row', 'u_action');
| $vars = array('action', 'user_row', 'u_action', 'user_id');
|
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
unset($u_action);
| extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
unset($u_action);
|
Line 1082 | Line 1088 |
---|
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>'; }
|
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>'; }
|
$last_active = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
| $last_active = $user_row['user_last_active'] ?: ($user_row['session_time'] ?? 0);
|
$inactive_reason = ''; if ($user_row['user_type'] == USER_INACTIVE)
| $inactive_reason = ''; if ($user_row['user_type'] == USER_INACTIVE)
|
Line 1126 | Line 1132 |
---|
$db->sql_freeresult($result);
$template->assign_vars(array(
|
$db->sql_freeresult($result);
$template->assign_vars(array(
|
'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
| 'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS_XY', (int) $config['min_name_chars']), $user->lang('CHARACTERS_XY', (int) $config['max_name_chars'])),
|
'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])), 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']), 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
| 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])), 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']), 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
Line 2275 | Line 2281 |
---|
} else {
|
} else {
|
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
| $view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
|
}
$template->assign_block_vars('attach', array(
| }
$template->assign_block_vars('attach', array(
|
Line 2513 | Line 2519 |
---|
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"), 'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'), 'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"), 'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'), 'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
| 'U_DELETE' => count($id_ary) > 1 ? $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'] : '',
|
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
'GROUP_NAME' => $group_helper->get_name($data['group_name']),
| 'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
'GROUP_NAME' => $group_helper->get_name($data['group_name']),
|
Line 2604 | Line 2610 |
---|
break;
default:
|
break;
default:
|
| $u_action = $this->u_action;
|
/** * Additional modes provided by extensions
| /** * Additional modes provided by extensions
|
Line 2613 | Line 2620 |
---|
* @var int user_id User id of the user to manage * @var array user_row Array with user data * @var array error Array with errors data
|
* @var int user_id User id of the user to manage * @var array user_row Array with user data * @var array error Array with errors data
|
| * @var string u_action The u_action link
|
* @since 3.2.2-RC1
|
* @since 3.2.2-RC1
|
| * @changed 3.2.10-RC1 Added u_action
|
*/
|
*/
|
$vars = array('mode', 'user_id', 'user_row', 'error');
| $vars = array('mode', 'user_id', 'user_row', 'error', 'u_action');
|
extract($phpbb_dispatcher->trigger_event('core.acp_users_mode_add', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.acp_users_mode_add', compact($vars)));
|
| unset($u_action);
|
break; }
| break; }
|