Vergleich admin/modules/user/users.php - 1.6.6 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: users.php 5646 2011-10-31 10:32:20Z PirataNervo $

 * $Id: users.php 5803 2012-04-20 08:35:26Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 159Zeile 159
	// We've selected a new avatar for this user!
if($mybb->input['avatar'])
{

	// We've selected a new avatar for this user!
if($mybb->input['avatar'])
{

		if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->input['my_post_key']))

		{
echo $lang->invalid_post_verify_key2;
exit;

		{
echo $lang->invalid_post_verify_key2;
exit;

Zeile 252Zeile 252
	// Get a listing of avatars/directories within this gallery
$sub_galleries = $avatars = array();
$files = @scandir($real_path);

	// Get a listing of avatars/directories within this gallery
$sub_galleries = $avatars = array();
$files = @scandir($real_path);

	

	

	if(is_array($files))
{
foreach($files as $file)

	if(is_array($files))
{
foreach($files as $file)

Zeile 393Zeile 393
	$db->update_query("users", $updated_user, "uid='{$user['uid']}'");

$plugins->run_hooks("admin_user_users_coppa_activate_commit");

	$db->update_query("users", $updated_user, "uid='{$user['uid']}'");

$plugins->run_hooks("admin_user_users_coppa_activate_commit");





	// Log admin action
log_admin_action($user['uid'], $user['username']);


	// Log admin action
log_admin_action($user['uid'], $user['username']);


Zeile 535Zeile 535
	$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password');
$form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password');

	$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password');
$form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password');

	$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');

$display_group_options[0] = $lang->use_primary_user_group;
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));

	$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');

$display_group_options[0] = $lang->use_primary_user_group;
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));

	while($usergroup = $db->fetch_array($query))
{
$options[$usergroup['gid']] = $usergroup['title'];
$display_group_options[$usergroup['gid']] = $usergroup['title'];

	while($usergroup = $db->fetch_array($query))
{
$options[$usergroup['gid']] = $usergroup['title'];
$display_group_options[$usergroup['gid']] = $usergroup['title'];

	}


	}


	$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

	$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

Zeile 573Zeile 573
		flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=user-users");
}

		flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=user-users");
}





	if($mybb->request_method == "post")
{
if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid']))

	if($mybb->request_method == "post")
{
if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid']))

Zeile 584Zeile 584

// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))


// Determine the usergroup stuff
if(is_array($mybb->input['additionalgroups']))

		{

		{

			foreach($mybb->input['additionalgroups'] as $key => $gid)
{
if($gid == $mybb->input['usergroup'])

			foreach($mybb->input['additionalgroups'] as $key => $gid)
{
if($gid == $mybb->input['usergroup'])

Zeile 623Zeile 623
			"aim" => $mybb->input['aim'],
"yahoo" => $mybb->input['yahoo'],
"msn" => $mybb->input['msn'],

			"aim" => $mybb->input['aim'],
"yahoo" => $mybb->input['yahoo'],
"msn" => $mybb->input['msn'],

 
			"birthday" => array(
"day" => $mybb->input['bday1'],
"month" => $mybb->input['bday2'],
"year" => $mybb->input['bday3']
),

			"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],
"dateformat" => intval($mybb->input['dateformat']),
"timeformat" => intval($mybb->input['timeformat']),
"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes']

			"style" => $mybb->input['style'],
"signature" => $mybb->input['signature'],
"dateformat" => intval($mybb->input['dateformat']),
"timeformat" => intval($mybb->input['timeformat']),
"language" => $mybb->input['language'],
"usernotes" => $mybb->input['usernotes']

		);


		);


		if($user['usergroup'] == 5 && $mybb->input['usergroup'] != 5)
{
if($user['coppauser'] == 1)

		if($user['usergroup'] == 5 && $mybb->input['usergroup'] != 5)
{
if($user['coppauser'] == 1)

Zeile 642Zeile 647
		{
$updated_user['password'] = $mybb->input['new_password'];
$updated_user['password2'] = $mybb->input['confirm_new_password'];

		{
$updated_user['password'] = $mybb->input['new_password'];
$updated_user['password2'] = $mybb->input['confirm_new_password'];

		}

		}


$updated_user['options'] = array(
"allownotices" => $mybb->input['allownotices'],


$updated_user['options'] = array(
"allownotices" => $mybb->input['allownotices'],

Zeile 676Zeile 681
		// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);
$errors = '';

		// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);
$errors = '';





		// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())
{

		// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())
{

Zeile 722Zeile 727
				$mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
$mybb->input['avatar_url'] = htmlspecialchars($mybb->input['avatar_url']);
$ext = get_extension($mybb->input['avatar_url']);

				$mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
$mybb->input['avatar_url'] = htmlspecialchars($mybb->input['avatar_url']);
$ext = get_extension($mybb->input['avatar_url']);





				// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
$file = fetch_remote_file($mybb->input['avatar_url']);
if(!$file)

				// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
$file = fetch_remote_file($mybb->input['avatar_url']);
if(!$file)

Zeile 814Zeile 819
				if(!$mybb->input[$option['action']])
{
if($user[$option['update_field']] == 1)

				if(!$mybb->input[$option['action']])
{
if($user[$option['update_field']] == 1)

					{

					{

						// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

						// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

Zeile 906Zeile 911
		// We need to fetch this users profile field values
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$mybb->input['profile_fields'] = $db->fetch_array($query);

		// We need to fetch this users profile field values
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$mybb->input['profile_fields'] = $db->fetch_array($query);

 
	}

if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3'])
{
$mybb->input['bday'][0] = $mybb->input['bday1'];
$mybb->input['bday'][1] = $mybb->input['bday2'];
$mybb->input['bday'][2] = intval($mybb->input['bday3']);
}
else
{
$mybb->input['bday'] = array();

if($user['birthday'])
{
$mybb->input['bday'] = explode('-', $user['birthday']);
}

	}

// Fetch custom profile fields

	}

// Fetch custom profile fields

Zeile 1057Zeile 1078
		$warning_level = get_colored_warning_level($warning_level);
}


		$warning_level = get_colored_warning_level($warning_level);
}




	$age = $lang->na;

	if($user['birthday'])

	if($user['birthday'])

	{

	{

		$age = get_age($user['birthday']);

		$age = get_age($user['birthday']);

	}

else
{
$age = '';
}


	}







	$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
$table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>");
$table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");

	$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
$table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>");
$table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");

Zeile 1095Zeile 1111
	// PROFILE
//
echo "<div id=\"tab_profile\">\n";

	// PROFILE
//
echo "<div id=\"tab_profile\">\n";





	$form_container = new FormContainer($lang->required_profile_info.": {$user['username']}");
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');

	$form_container = new FormContainer($lang->required_profile_info.": {$user['username']}");
$form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');

Zeile 1113Zeile 1129
	if(!is_array($mybb->input['additionalgroups']))
{
$mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);

	if(!is_array($mybb->input['additionalgroups']))
{
$mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);

	}


	}


	$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

	$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
$form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups');
$form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');

Zeile 1132Zeile 1148
	$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim');
$form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo');
$form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');

	$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim');
$form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo');
$form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');

 


	// Birthday

	// Birthday

 
	$birthday_days = array(0 => '');
for($i = 1; $i <= 31; $i++)
{
$birthday_days[$i] = $i;
}

$birthday_months = array(
0 => '',
1 => $lang->january,
2 => $lang->february,
3 => $lang->march,
4 => $lang->april,
5 => $lang->may,
6 => $lang->june,
7 => $lang->july,
8 => $lang->august,
9 => $lang->september,
10 => $lang->october,
11 => $lang->november,
12 => $lang->december
);

$birthday_row = $form->generate_select_box('bday1', $birthday_days, $mybb->input['bday'][0], array('id' => 'bday_day'));
$birthday_row .= ' '.$form->generate_select_box('bday2', $birthday_months, $mybb->input['bday'][1], array('id' => 'bday_month'));
$birthday_row .= ' '.$form->generate_text_box('bday3', $mybb->input['bday'][2], array('id' => 'bday_year', 'style' => 'width: 3em;'));

$form_container->output_row($lang->birthday, "", $birthday_row, 'birthday');


// Output custom profile fields - optional
output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);


// Output custom profile fields - optional
output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);

Zeile 1459Zeile 1503
	);

echo "<div id=\"tab_modoptions\">\n";

	);

echo "<div id=\"tab_modoptions\">\n";

	$form_container = new FormContainer($lang->mod_options);

	$form_container = new FormContainer($lang->mod_options.": {$user['username']}");

	$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');

// Mod posts

	$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');

// Mod posts

Zeile 1606Zeile 1650
	if($mybb->request_method == "post")
{
// Delete the user

	if($mybb->request_method == "post")
{
// Delete the user

		$db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");

 
		$db->delete_query("userfields", "ufid='{$user['uid']}'");
$db->delete_query("privatemessages", "uid='{$user['uid']}'");
$db->delete_query("events", "uid='{$user['uid']}'");

		$db->delete_query("userfields", "ufid='{$user['uid']}'");
$db->delete_query("privatemessages", "uid='{$user['uid']}'");
$db->delete_query("events", "uid='{$user['uid']}'");

Zeile 1619Zeile 1662
		$db->delete_query("joinrequests", "uid='{$user['uid']}'");
$db->delete_query("warnings", "uid='{$user['uid']}'");
$db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");

		$db->delete_query("joinrequests", "uid='{$user['uid']}'");
$db->delete_query("warnings", "uid='{$user['uid']}'");
$db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");

		$db->delete_query("awaitingactivation", "uid='{$uid}'");




		$db->delete_query("awaitingactivation", "uid='{$user['uid']}'");
$db->delete_query("posts", "uid = '{$user['uid']}' AND visible = '-2'");
$db->delete_query("threads", "uid = '{$user['uid']}' AND visible = '-2'");


		// Update forum stats
update_stats(array('numusers' => '-1'));

		// Update forum stats
update_stats(array('numusers' => '-1'));

 

// Update forums & threads if user is the lastposter
$db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
$db->update_query("forums", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");
$db->update_query("threads", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");


// Did this user have an uploaded avatar?
if($user['avatartype'] == "upload")


// Did this user have an uploaded avatar?
if($user['avatartype'] == "upload")

Zeile 1639Zeile 1689
		}

$plugins->run_hooks("admin_user_users_delete_commit");

		}

$plugins->run_hooks("admin_user_users_delete_commit");





		// Log admin action
log_admin_action($user['uid'], $user['username']);


		// Log admin action
log_admin_action($user['uid'], $user['username']);


Zeile 1666Zeile 1716
	);

$page->output_nav_tabs($sub_tabs, 'referrers');

	);

$page->output_nav_tabs($sub_tabs, 'referrers');

	

	

	// Fetch default admin view
$default_view = fetch_default_view("user");
if(!$default_view)

	// Fetch default admin view
$default_view = fetch_default_view("user");
if(!$default_view)

	{

	{

		$default_view = "0";

		$default_view = "0";

	}

	}

	$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc"));
$admin_view = $db->fetch_array($query);

	$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc"));
$admin_view = $db->fetch_array($query);


if($mybb->input['type'])
{
$admin_view['view_type'] = $mybb->input['type'];
}



if($mybb->input['type'])
{
$admin_view['view_type'] = $mybb->input['type'];
}


	$admin_view['conditions'] = unserialize($admin_view['conditions']);
$admin_view['conditions']['referrer'] = $mybb->input['uid'];


	$admin_view['conditions'] = unserialize($admin_view['conditions']);
$admin_view['conditions']['referrer'] = $mybb->input['uid'];


Zeile 1692Zeile 1742
if($mybb->input['action'] == "ipaddresses")
{
$plugins->run_hooks("admin_user_users_ipaddresses");

if($mybb->input['action'] == "ipaddresses")
{
$plugins->run_hooks("admin_user_users_ipaddresses");

	

	

	$page->add_breadcrumb_item($lang->ip_addresses);
$page->output_header($lang->ip_addresses);


	$page->add_breadcrumb_item($lang->ip_addresses);
$page->output_header($lang->ip_addresses);


Zeile 1716Zeile 1766
	$table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));

if(empty($user['lastip']))

	$table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));

if(empty($user['lastip']))

	{

	{

		$user['lastip'] = $lang->unknown;
$controls = '';
}

		$user['lastip'] = $lang->unknown;
$controls = '';
}

Zeile 1728Zeile 1778
		$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("postip" => $user['lastip']))));
$popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}', 'iplookup', 500, 250); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['lastip']}");

		$popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&amp;results=1&amp;action=search&amp;conditions=".urlencode(serialize(array("postip" => $user['lastip']))));
$popup->add_item($lang->info_on_ip, "{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$user['lastip']}', 'iplookup', 500, 250); return false;");
$popup->add_item($lang->ban_ip, "index.php?module=config-banning&amp;filter={$user['lastip']}");

		$controls = $popup->fetch();

		$controls = $popup->fetch();

	}
$table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}");
$table->construct_cell($controls, array('class' => "align_center"));

	}
$table->construct_cell("<strong>{$lang->last_known_ip}:</strong> {$user['lastip']}");
$table->construct_cell($controls, array('class' => "align_center"));

Zeile 1845Zeile 1895
				// Update the moderator cache...
$cache->update_moderators();
}

				// Update the moderator cache...
$cache->update_moderators();
}

 

// Forums & Threads
$db->update_query("forums", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");
$db->update_query("threads", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");

// Banning
$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");


// Merging Reputation
// First, let's change all the details over to our new user...


// Merging Reputation
// First, let's change all the details over to our new user...

Zeile 1963Zeile 2020
			flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success");
admin_redirect("index.php?module=user-users");
exit;

			flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success");
admin_redirect("index.php?module=user-users");
exit;

		}
}


		}
}


	$page->add_breadcrumb_item($lang->merge_users);
$page->output_header($lang->merge_users);


	$page->add_breadcrumb_item($lang->merge_users);
$page->output_header($lang->merge_users);


Zeile 2057Zeile 2114
			$admin_view['sortby'] = $mybb->input['sortby'];
}


			$admin_view['sortby'] = $mybb->input['sortby'];
}


		if($mybb->input['perpage'])

		if(intval($mybb->input['perpage']))

		{
$admin_view['perpage'] = $mybb->input['perpage'];

		{
$admin_view['perpage'] = $mybb->input['perpage'];

		}


		}


		if($mybb->input['order'])
{
$admin_view['sortorder'] = $mybb->input['order'];

		if($mybb->input['order'])
{
$admin_view['sortorder'] = $mybb->input['order'];

Zeile 2586Zeile 2643
						}

// Require the rebuild functions

						}

// Require the rebuild functions

						require_once(MYBB_ROOT.'/inc/functions.php');
require_once(MYBB_ROOT.'/inc/functions_rebuild.php');

						require_once MYBB_ROOT.'/inc/functions.php';
require_once MYBB_ROOT.'/inc/functions_rebuild.php';


// We've finished deleting user's posts, so let's delete the threads
if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)


// We've finished deleting user's posts, so let's delete the threads
if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)

Zeile 2713Zeile 2770
								unset($mybb->input['additionalgroups'][$key]);
}
}

								unset($mybb->input['additionalgroups'][$key]);
}
}

						$additionalgroups = implode(",", $mybb->input['additionalgroups']);

						$additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));

					}
else
{

					}
else
{

Zeile 2722Zeile 2779

// Create an update array
$update_array = array(


// Create an update array
$update_array = array(

						"usergroup" => $mybb->input['usergroup'],

						"usergroup" => intval($mybb->input['usergroup']),

						"additionalgroups" => $additionalgroups,

						"additionalgroups" => $additionalgroups,

						"displaygroup" => $mybb->input['displaygroup']

						"displaygroup" => intval($mybb->input['displaygroup'])

					);

// Do the usergroup update for all those selected

					);

// Do the usergroup update for all those selected

Zeile 3196Zeile 3253

foreach($view['conditions']['usergroup'] as $usergroup)
{


foreach($view['conditions']['usergroup'] as $usergroup)
{

 
			$usergroup = intval($usergroup);

if(!$usergroup)
{
continue;
}


			switch($db->type)
{
case "pgsql":

			switch($db->type)
{
case "pgsql":

Zeile 3206Zeile 3270
					$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'";
}
}

					$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'";
}
}

		$search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";



$search_sql .= " AND (u.usergroup IN (".implode(",", array_map('intval', $view['conditions']['usergroup'])).") {$additional_sql})";

	}

// COPPA users only?

	}

// COPPA users only?