Zeile 1598 | Zeile 1598 |
---|
$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']}'");
|
$db->delete_query("moderators", "id='{$user['uid']}' AND isgroup = '0'");
| |
$db->delete_query("forumsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'");
| $db->delete_query("forumsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'");
|
Zeile 1612 | Zeile 1611 |
---|
// Update forum stats update_stats(array('numusers' => '-1'));
|
// Update forum stats update_stats(array('numusers' => '-1'));
|
| // Did this user have an uploaded avatar? if($user['avatartype'] == "upload") { // Removes the ./ at the beginning the timestamp on the end... @unlink("../".substr($user['avatar'], 2, -20)); }
// Was this user a moderator? if(is_moderator($user['uid'])) { $db->delete_query("moderators", "id='{$user['uid']}' AND isgroup = '0'"); $cache->update_moderators(); }
|
$plugins->run_hooks("admin_user_users_delete_commit");
// Log admin action log_admin_action($user['uid'], $user['username']);
|
$plugins->run_hooks("admin_user_users_delete_commit");
// Log admin action log_admin_action($user['uid'], $user['username']);
|
| |
flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
| flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
|
Zeile 1769 | Zeile 1781 |
---|
if(!$destination_user['uid']) { $errors[] = $lang->error_invalid_user_destination;
|
if(!$destination_user['uid']) { $errors[] = $lang->error_invalid_user_destination;
|
}
| } // If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid']))) { flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users"); }
|
if($source_user['uid'] == $destination_user['uid']) { $errors[] = $lang->error_cannot_merge_same_account;
| if($source_user['uid'] == $destination_user['uid']) { $errors[] = $lang->error_cannot_merge_same_account;
|
Zeile 1833 | Zeile 1852 |
---|
while($rep = $db->fetch_array($query)) { if($rep['pid'] == 0 && $mybb->settings['multirep'] == 0 && $last_result['uid'] == $rep['uid'])
|
while($rep = $db->fetch_array($query)) { if($rep['pid'] == 0 && $mybb->settings['multirep'] == 0 && $last_result['uid'] == $rep['uid'])
|
{
| {
|
// Multiple reputation is disallowed, and this isn't a post, so let's remove this comment $to_remove[] = $rep['rid'];
|
// Multiple reputation is disallowed, and this isn't a post, so let's remove this comment $to_remove[] = $rep['rid'];
|
}
| }
|
// Remove comments or posts liked by "me" if($last_result['uid'] == $destination_user['uid'] || $rep['uid'] == $destination_user['uid']) {
| // Remove comments or posts liked by "me" if($last_result['uid'] == $destination_user['uid'] || $rep['uid'] == $destination_user['uid']) {
|
Zeile 1852 | Zeile 1871 |
---|
"rid" => $rep['rid'], "uid" => $rep['uid'] );
|
"rid" => $rep['rid'], "uid" => $rep['uid'] );
|
}
| }
|
// Remove any reputations we've selected to remove... if(!empty($to_remove)) {
| // Remove any reputations we've selected to remove... if(!empty($to_remove)) {
|
Zeile 1864 | Zeile 1883 |
---|
// Calculate the new reputation for this user... $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep");
|
// Calculate the new reputation for this user... $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep");
|
|
|
$db->update_query("users", array('reputation' => intval($total_reputation)), "uid='{$destination_user['uid']}'");
// Additional updates for non-uid fields
| $db->update_query("users", array('reputation' => intval($total_reputation)), "uid='{$destination_user['uid']}'");
// Additional updates for non-uid fields
|
Zeile 2621 | Zeile 2640 |
---|
}
// Display the prune options
|
}
// Display the prune options
|
$form = new Form("index.php?module=user-users", "post");
| $form = new Form("index.php?module=user-users", "post");
|
echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiprune'); echo $form->generate_hidden_field('processed', '1');
| echo $form->generate_hidden_field('action', 'inline_edit'); echo $form->generate_hidden_field('inline_action', 'multiprune'); echo $form->generate_hidden_field('processed', '1');
|
Zeile 3378 | Zeile 3397 |
---|
$built_view .= $search->generate_text_box('username', $value, array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; if($view['popup'])
|
$built_view .= $search->generate_text_box('username', $value, array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; if($view['popup'])
|
{
| {
|
$built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; } $built_view .= "<script type='text/javascript'>
| $built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; } $built_view .= "<script type='text/javascript'>
|
Zeile 3471 | Zeile 3490 |
---|
}
function build_user_view_card($user, $view, &$i)
|
}
function build_user_view_card($user, $view, &$i)
|
{ global $user_view_fields;
| { global $user_view_fields;
|
++$i; if($i == 3) {
| ++$i; if($i == 3) {
|
Zeile 3536 | Zeile 3555 |
---|
if($avatar) { $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
|
if($avatar) { $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
|
}
| }
|
if($user_details) { $card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n";
|
if($user_details) { $card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n";
|
}
| }
|
if($controls) { $card .= "<div class=\"float_right\" style=\"padding: 4px;\">{$controls}</div>\n";
| if($controls) { $card .= "<div class=\"float_right\" style=\"padding: 4px;\">{$controls}</div>\n";
|
Zeile 3567 | Zeile 3586 |
---|
$field_options['class'] = "align_".$view_field['align']; } if($user['view'][$field])
|
$field_options['class'] = "align_".$view_field['align']; } if($user['view'][$field])
|
{
| {
|
$value = $user['view'][$field]; } else
| $value = $user['view'][$field]; } else
|
Zeile 3627 | Zeile 3646 |
---|
{ $user_options = $values[$field_name]; }
|
{ $user_options = $values[$field_name]; }
|
|
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
|
$select_options = array();
| $select_options = explode("\n", $options);
|
$options = array(); if($search == true) { $select_options[''] = $lang->na; }
|
$options = array(); if($search == true) { $select_options[''] = $lang->na; }
|
$select_options += explode("\n", $options);
| |
foreach($select_options as $val) {
| foreach($select_options as $val) {
|