mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
some fixes today
- most important change is the consolidation of the display attachment functions; merging them together to have one function we need to call. git-svn-id: file:///svn/phpbb/trunk@6803 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -181,17 +181,17 @@ class acp_bots
|
||||
}
|
||||
|
||||
$user_id = user_add(array(
|
||||
'user_type' => (int) USER_IGNORE,
|
||||
'group_id' => (int) $group_row['group_id'],
|
||||
'username' => (string) $bot_row['bot_name'],
|
||||
'user_regdate' => time(),
|
||||
'user_password' => '',
|
||||
'user_colour' => (string) $group_row['group_colour'],
|
||||
'user_email' => '',
|
||||
'user_lang' => (string) $bot_row['bot_lang'],
|
||||
'user_style' => (int) $bot_row['bot_style'],
|
||||
'user_options' => 0)
|
||||
);
|
||||
'user_type' => (int) USER_IGNORE,
|
||||
'group_id' => (int) $group_row['group_id'],
|
||||
'username' => (string) $bot_row['bot_name'],
|
||||
'user_regdate' => time(),
|
||||
'user_password' => '',
|
||||
'user_colour' => (string) $group_row['group_colour'],
|
||||
'user_email' => '',
|
||||
'user_lang' => (string) $bot_row['bot_lang'],
|
||||
'user_style' => (int) $bot_row['bot_style'],
|
||||
'user_allow_massemail' => 0,
|
||||
));
|
||||
|
||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'user_id' => (int) $user_id,
|
||||
|
@@ -26,6 +26,8 @@ class acp_inactive
|
||||
global $config, $db, $user, $auth, $template;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
$action = request_var('action', '');
|
||||
@@ -43,7 +45,8 @@ class acp_inactive
|
||||
{
|
||||
case 'activate':
|
||||
case 'delete':
|
||||
$sql = 'SELECT username
|
||||
|
||||
$sql = 'SELECT user_id, username
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark);
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -51,13 +54,12 @@ class acp_inactive
|
||||
$user_affected = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_affected[] = $row['username'];
|
||||
$user_affected[$row['user_id']] = $row['username'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($action == 'activate')
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
user_active_flip('activate', $mark);
|
||||
}
|
||||
else if ($action == 'delete')
|
||||
@@ -67,14 +69,14 @@ class acp_inactive
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
|
||||
$db->sql_query($sql);
|
||||
$sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
|
||||
foreach ($mark as $user_id)
|
||||
{
|
||||
user_delete('retain', $user_id, $user_affected[$user_id]);
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
|
||||
|
||||
break;
|
||||
|
||||
case 'remind':
|
||||
|
Reference in New Issue
Block a user