mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Merge remote-tracking branch 'nickvergessen/feature/php-events-4' into develop
This commit is contained in:
@@ -32,6 +32,7 @@ class acp_users
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang(array('posting', 'ucp', 'acp/users'));
|
||||
$this->tpl_name = 'acp_users';
|
||||
@@ -749,6 +750,19 @@ class acp_users
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
/**
|
||||
* Run custom quicktool code
|
||||
*
|
||||
* @event core.acp_users_overview_run_quicktool
|
||||
* @var array user_row Current user data
|
||||
* @var string action Quick tool that should be run
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$vars = array('action', 'user_row');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
|
||||
break;
|
||||
}
|
||||
|
||||
// Handle registration info updates
|
||||
@@ -855,6 +869,18 @@ class acp_users
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify user data before we update it
|
||||
*
|
||||
* @event core.acp_users_overview_modify_data
|
||||
* @var array user_row Current user data
|
||||
* @var array data Submitted user data
|
||||
* @var array sql_ary User data we udpate
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$vars = array('user_row', 'data', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_modify_data', compact($vars)));
|
||||
|
||||
if ($update_username !== false)
|
||||
{
|
||||
$sql_ary['username'] = $update_username;
|
||||
@@ -945,12 +971,6 @@ class acp_users
|
||||
}
|
||||
}
|
||||
|
||||
$s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
|
||||
foreach ($quick_tool_ary as $value => $lang)
|
||||
{
|
||||
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
|
||||
}
|
||||
|
||||
if ($config['load_onlinetrack'])
|
||||
{
|
||||
$sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
|
||||
@@ -965,6 +985,23 @@ class acp_users
|
||||
unset($row);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add additional quick tool options and overwrite user data
|
||||
*
|
||||
* @event core.acp_users_display_overview
|
||||
* @var array user_row Array with user data
|
||||
* @var array quick_tool_ary Ouick tool options
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$vars = array('user_row', 'quick_tool_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_display_overview', compact($vars)));
|
||||
|
||||
$s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
|
||||
foreach ($quick_tool_ary as $value => $lang)
|
||||
{
|
||||
$s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
|
||||
}
|
||||
|
||||
$last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
|
||||
|
||||
$inactive_reason = '';
|
||||
|
Reference in New Issue
Block a user