Zeile 546 | Zeile 546 |
---|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
$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'];
| $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); $display_group_options[$usergroup['gid']] = htmlspecialchars_uni($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->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
|
Zeile 730 | Zeile 730 |
---|
else if($mybb->input['avatar_url'] && $mybb->input['avatar_url'] != $user['avatar']) { $mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
|
else if($mybb->input['avatar_url'] && $mybb->input['avatar_url'] != $user['avatar']) { $mybb->input['avatar_url'] = preg_replace("#script:#i", "", $mybb->input['avatar_url']);
|
$mybb->input['avatar_url'] = htmlspecialchars_uni($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)
| $ext = get_extension($mybb->input['avatar_url']);
// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
|
Zeile 1143 | Zeile 1142 |
---|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
$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'];
| $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); $display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
}
if(!is_array($mybb->input['additionalgroups']))
| }
if(!is_array($mybb->input['additionalgroups']))
|
Zeile 1472 | Zeile 1471 |
---|
if($errors) {
|
if($errors) {
|
$avatar_url = $mybb->input['avatar_url'];
| $avatar_url = htmlspecialchars_uni($mybb->input['avatar_url']);
|
}
if($mybb->settings['maxavatardims'] != "")
| }
if($mybb->settings['maxavatardims'] != "")
|
Zeile 1685 | Zeile 1684 |
---|
$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 1691 |
---|
$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 2018 | Zeile 2035 |
---|
$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 2556 | Zeile 2599 |
---|
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 2570 | Zeile 2615 |
---|
$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 $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($update_thread_ratings_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 2905 | Zeile 2967 |
---|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
$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'];
| $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); $display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
}
if(!is_array($mybb->input['additionalgroups']))
| }
if(!is_array($mybb->input['additionalgroups']))
|
Zeile 3155 | Zeile 3217 |
---|
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]) {
|
Zeile 3436 | Zeile 3498 |
---|
{ $comma = $groups_list = ''; $user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>";
|
{ $comma = $groups_list = ''; $user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>";
|
$user['view']['usergroup'] = $usergroups[$user['usergroup']]['title'];
| $user['view']['usergroup'] = htmlspecialchars_uni($usergroups[$user['usergroup']]['title']);
|
if($user['additionalgroups']) { $additional_groups = explode(",", $user['additionalgroups']);
foreach($additional_groups as $group) {
|
if($user['additionalgroups']) { $additional_groups = explode(",", $user['additionalgroups']);
foreach($additional_groups as $group) {
|
$groups_list .= "{$comma}{$usergroups[$group]['title']}";
| $groups_list .= $comma.htmlspecialchars_uni($usergroups[$group]['title']);
|
$comma = $lang->comma; } }
| $comma = $lang->comma; } }
|
Zeile 3833 | Zeile 3895 |
---|
} foreach($fields as $profile_field) {
|
} foreach($fields as $profile_field) {
|
| $profile_field['name'] = htmlspecialchars_uni($profile_field['name']); $profile_field['description'] = htmlspecialchars_uni($profile_field['description']);
|
$profile_field['type'] = htmlspecialchars_uni($profile_field['type']); list($type, $options) = explode("\n", $profile_field['type'], 2); $type = trim($type);
| $profile_field['type'] = htmlspecialchars_uni($profile_field['type']); list($type, $options) = explode("\n", $profile_field['type'], 2); $type = trim($type);
|
Zeile 3994 | Zeile 4058 |
---|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
$options[$usergroup['gid']] = $usergroup['title'];
| $options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
}
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
| }
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
|