Line 143 | Line 143 |
---|
)); }
|
)); }
|
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !$passwords_manager->check($data['new_password'], $user->data['user_password']))
| if ($auth->acl_get('u_chgpasswd') && $data['new_password'])
|
{ $sql_ary['user_passchg'] = time();
| { $sql_ary['user_passchg'] = time();
|
Line 186 | Line 186 |
---|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
|
'USERNAME' => htmlspecialchars_decode($data['username']),
| 'USERNAME' => html_entity_decode($data['username'], ENT_COMPAT),
|
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") );
| 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") );
|
Line 196 | Line 196 |
---|
{ $notifications_manager = $phpbb_container->get('notification_manager'); $notifications_manager->add_notifications('notification.type.admin_activate_user', array(
|
{ $notifications_manager = $phpbb_container->get('notification_manager'); $notifications_manager->add_notifications('notification.type.admin_activate_user', array(
|
'user_id' => $user->data['user_id'], 'user_actkey' => $user_actkey, 'user_regdate' => time(), // Notification time
| 'user_id' => $user->data['user_id'], 'user_actkey' => $user_actkey, 'user_actkey_expiration' => $user::get_token_expiration(), 'user_regdate' => time(), // Notification time
|
)); }
| )); }
|
Line 265 | Line 266 |
---|
'NEW_PASSWORD' => $data['new_password'], 'CUR_PASSWORD' => '',
|
'NEW_PASSWORD' => $data['new_password'], 'CUR_PASSWORD' => '',
|
'L_USERNAME_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_USERNAME_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'])),
'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,
| 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])),
'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,
|
Line 810 | Line 811 |
---|
$error = array_map(array($user, 'lang'), $error); }
|
$error = array_map(array($user, 'lang'), $error); }
|
$sql = 'SELECT key_id, last_ip, last_login FROM ' . SESSIONS_KEYS_TABLE . ' WHERE user_id = ' . (int) $user->data['user_id'] . ' ORDER BY last_login ASC';
| $sql_ary = [ 'SELECT' => 'sk.key_id, sk.last_ip, sk.last_login', 'FROM' => [SESSIONS_KEYS_TABLE => 'sk'], 'WHERE' => 'sk.user_id = ' . (int) $user->data['user_id'], 'ORDER_BY' => 'sk.last_login ASC', ];
|
|
|
$result = $db->sql_query($sql);
| /** * Event allows changing SQL query for autologin keys * * @event core.ucp_profile_autologin_keys_sql * @var array sql_ary Array with autologin keys SQL query * @since 3.3.2-RC1 */ $vars = ['sql_ary']; extract($phpbb_dispatcher->trigger_event('core.ucp_profile_autologin_keys_sql', compact($vars)));
|
|
|
while ($row = $db->sql_fetchrow($result))
| $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); $sessions = (array) $db->sql_fetchrowset($result); $db->sql_freeresult($result);
$template_vars = []; foreach ($sessions as $row)
|
{
|
{
|
$template->assign_block_vars('sessions', array( 'KEY' => substr($row['key_id'], 0, 8),
| $key = substr($row['key_id'], 0, 8); $template_vars[$key] = [ 'KEY' => $key,
|
'IP' => $row['last_ip'], 'LOGIN_TIME' => $user->format_date($row['last_login']),
|
'IP' => $row['last_ip'], 'LOGIN_TIME' => $user->format_date($row['last_login']),
|
));
| ];
|
}
|
}
|
$db->sql_freeresult($result);
| /** * Event allows changing template variables * * @event core.ucp_profile_autologin_keys_template_vars * @var array sessions Array with session keys data * @var array template_vars Array with template variables * @since 3.3.2-RC1 */ $vars = ['sessions', 'template_vars']; extract($phpbb_dispatcher->trigger_event('core.ucp_profile_autologin_keys_template_vars', compact($vars)));
$template->assign_block_vars_array('sessions', $template_vars);
|
break; }
| break; }
|