2012-09-01 08:00:24 +00:00
|
|
|
<?
|
2013-04-17 08:00:58 +00:00
|
|
|
authorize();
|
|
|
|
include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
if (!check_perms('users_mod')) {
|
|
|
|
error(403);
|
|
|
|
}
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
$UserID = $_REQUEST['userid'];
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
switch ($_REQUEST['dupeaction']) {
|
|
|
|
case 'remove':
|
|
|
|
unlink_user($_REQUEST['removeid']);
|
|
|
|
break;
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
case 'update':
|
|
|
|
if ($_REQUEST['target']) {
|
|
|
|
$Target = $_REQUEST['target'];
|
2013-06-09 08:01:21 +00:00
|
|
|
$DB->query("
|
|
|
|
SELECT ID
|
|
|
|
FROM users_main
|
|
|
|
WHERE Username LIKE '".db_string($Target)."'");
|
2013-04-17 08:00:58 +00:00
|
|
|
if (list($TargetID) = $DB->next_record()) {
|
|
|
|
link_users($UserID, $TargetID);
|
|
|
|
} else {
|
|
|
|
error("User '$Target' not found.");
|
2012-09-01 08:00:24 +00:00
|
|
|
}
|
2013-04-17 08:00:58 +00:00
|
|
|
}
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-06-09 08:01:21 +00:00
|
|
|
$DB->query("
|
|
|
|
SELECT GroupID
|
|
|
|
FROM users_dupes
|
|
|
|
WHERE UserID = '$UserID'");
|
2013-04-17 08:00:58 +00:00
|
|
|
list($GroupID) = $DB->next_record();
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
if ($_REQUEST['dupecomments'] && $GroupID) {
|
|
|
|
dupe_comments($GroupID, $_REQUEST['dupecomments']);
|
|
|
|
}
|
|
|
|
break;
|
2013-02-22 08:00:24 +00:00
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
default:
|
|
|
|
error(403);
|
|
|
|
}
|
|
|
|
echo '\o/';
|
|
|
|
header("Location: user.php?id=$UserID");
|
|
|
|
?>
|