Zeile 1685 | Zeile 1685 |
---|
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'");
|
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'");
|
$db->delete_query("threadratings", "uid='{$user['uid']}'");
| |
$db->delete_query("users", "uid='{$user['uid']}'"); $db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'");
| $db->delete_query("users", "uid='{$user['uid']}'"); $db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'");
|
Zeile 1693 | Zeile 1692 |
---|
$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'");
|
$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 thread ratings $query = $db->query(" SELECT r.*, t.numratings, t.totalratings FROM ".TABLE_PREFIX."threadratings r LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=r.tid) WHERE r.uid='{$user['uid']}' "); while($rating = $db->fetch_array($query)) { $update_thread = array( "numratings" => $rating['numratings'] - 1, "totalratings" => $rating['totalratings'] - $rating['rating'] ); $db->update_query("threads", $update_thread, "tid='{$rating['tid']}'"); }
$db->delete_query("threadratings", "uid='{$user['uid']}'");
|
// 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']}'");
|
// 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("threads", 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']}'");
| $db->update_query("forums", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'"); $db->update_query("threads", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");
|
Zeile 1945 | Zeile 1963 |
---|
// 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...
|
$rep_update = array( "adduid" => $destination_user['uid'], "uid" => $destination_user['uid'] ); $db->update_query("reputation", $rep_update, "adduid = '".$source_user['uid']."' OR uid = '".$source_user['uid']."'");
| $db->update_query("reputation", array("adduid" => $destination_user['uid']), "adduid = '".$source_user['uid']."'"); $db->update_query("reputation", array("uid" => $destination_user['uid']), "uid = '".$source_user['uid']."'");
|
// Now that all the repuation is merged, figure out what to do with this user's comments... $options = array(
| // Now that all the repuation is merged, figure out what to do with this user's comments... $options = array(
|
Zeile 1976 | Zeile 1991 |
---|
continue; } }
|
continue; } }
|
|
|
$last_result = array( "rid" => $rep['rid'], "uid" => $rep['uid']
| $last_result = array( "rid" => $rep['rid'], "uid" => $rep['uid']
|
Zeile 2003 | Zeile 2018 |
---|
WHERE uid='{$source_user['uid']}' AND expired='0' "); $original_warn_level = $db->fetch_field($query, "warn_lev");
|
WHERE uid='{$source_user['uid']}' AND expired='0' "); $original_warn_level = $db->fetch_field($query, "warn_lev");
|
|
|
$query = $db->query(" SELECT SUM(points) as warn_lev FROM ".TABLE_PREFIX."warnings
| $query = $db->query(" SELECT SUM(points) as warn_lev FROM ".TABLE_PREFIX."warnings
|
Zeile 2021 | Zeile 2036 |
---|
$db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array( "edituid" => $destination_user['uid']
|
$db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array( "edituid" => $destination_user['uid']
|
);
| );
|
$db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
|
$db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
|
|
|
$from_uid = array( "fromid" => $destination_user['uid']
|
$from_uid = array( "fromid" => $destination_user['uid']
|
);
| );
|
$db->update_query("privatemessages", $from_uid, "fromid='{$source_user['uid']}'"); $to_uid = array( "toid" => $destination_user['uid']
|
$db->update_query("privatemessages", $from_uid, "fromid='{$source_user['uid']}'"); $to_uid = array( "toid" => $destination_user['uid']
|
);
| );
|
$db->update_query("privatemessages", $to_uid, "toid='{$source_user['uid']}'");
|
$db->update_query("privatemessages", $to_uid, "toid='{$source_user['uid']}'");
|
| // Buddy/ignore lists
$destination_buddies = explode(',', $destination_user['buddylist']); $source_buddies = explode(',', $source_user['buddylist']); $buddies = array_unique(array_merge($source_buddies, $destination_buddies)); // Make sure the new buddy list doesn't contain either users $buddies_array = array_diff($buddies, array($destination_user['uid'], $source_user['uid']));
$destination_ignored = explode(',', $destination_user['ignorelist']); $source_ignored = explode(',', $destination_user['ignorelist']); $ignored = array_unique(array_merge($source_ignored, $destination_ignored)); // ... and the same for the new ignore list $ignored_array = array_diff($ignored, array($destination_user['uid'], $source_user['uid']));
// Remove any ignored users from the buddy list $buddies = array_diff($buddies_array, $ignored_array); // implode the arrays so we get a nice neat list for each $buddies = trim(implode(',', $buddies), ','); $ignored = trim(implode(',', $ignored_array), ',');
$lists = array( "buddylist" => $buddies, "ignorelist" => $ignored ); $db->update_query("users", $lists, "uid='{$destination_user['uid']}'");
|
// Delete the old user $db->delete_query("users", "uid='{$source_user['uid']}'");
| // Delete the old user $db->delete_query("users", "uid='{$source_user['uid']}'");
|
Zeile 2559 | Zeile 2600 |
---|
if($user['uid'] == $mybb->user['uid'] || is_super_admin($user['uid'])) { // Remove me and super admins
|
if($user['uid'] == $mybb->user['uid'] || is_super_admin($user['uid'])) { // Remove me and super admins
|
| --$to_be_deleted;
|
continue; } else { // Run delete queries $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
|
continue; } else { // Run delete queries $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
|
| $db->update_query("threads", 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 2573 | Zeile 2616 |
---|
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'");
|
$db->delete_query("threadsubscriptions", "uid='{$user['uid']}'"); $db->delete_query("sessions", "uid='{$user['uid']}'"); $db->delete_query("banned", "uid='{$user['uid']}'");
|
$db->delete_query("threadratings", "uid='{$user['uid']}'");
| |
$db->delete_query("users", "uid='{$user['uid']}'"); $db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'");
|
$db->delete_query("users", "uid='{$user['uid']}'"); $db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'");
|
| // Update thread ratings $query = $db->query(" SELECT r.*, t.numratings, t.totalratings FROM ".TABLE_PREFIX."threadratings r LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=r.tid) WHERE r.uid='{$user['uid']}' "); while($rating = $db->fetch_array($query)) { $update_thread = array( "numratings" => $rating['numratings'] - 1, "totalratings" => $rating['totalratings'] - $rating['rating'] ); $db->update_query("threads", $update_thread, "tid='{$rating['tid']}'"); }
$db->delete_query("threadratings", "uid='{$user['uid']}'");
|
} } // Update forum stats, remove the cookie and redirect the user
| } } // Update forum stats, remove the cookie and redirect the user
|
Zeile 3158 | Zeile 3218 |
---|
foreach($direction_fields as $search_field) { $direction_field = $search_field."_dir";
|
foreach($direction_fields as $search_field) { $direction_field = $search_field."_dir";
|
if(!empty($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
| if(isset($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
|
{ switch($view['conditions'][$direction_field]) {
| { switch($view['conditions'][$direction_field]) {
|