phpBB

Code Changes

File: includes/functions_user.php

  Unmodified   Added   Modified   Removed
Line 330Line 330

/**
* Remove User


/**
* Remove User

 
 *
* @param string $mode 'retain' or 'remove'
* @param int $user_id
* @param mixed $post_username
* @return bool

*/
function user_delete($mode, $user_id, $post_username = false)
{

*/
function user_delete($mode, $user_id, $post_username = false)
{

	global $cache, $config, $db, $user, $auth;

	global $cache, $config, $db, $user;

	global $phpbb_root_path, $phpEx;

$sql = 'SELECT *

	global $phpbb_root_path, $phpEx;

$sql = 'SELECT *

Line 437Line 442
				$sql = 'UPDATE ' . POSTS_TABLE . '
SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($post_username) . "'
WHERE poster_id = $user_id";

				$sql = 'UPDATE ' . POSTS_TABLE . '
SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($post_username) . "'
WHERE poster_id = $user_id";

				$db->sql_query($sql);

$sql = 'UPDATE ' . POSTS_TABLE . '
SET post_edit_user = ' . ANONYMOUS . "
WHERE post_edit_user = $user_id";

 
				$db->sql_query($sql);

$sql = 'UPDATE ' . TOPICS_TABLE . '

				$db->sql_query($sql);

$sql = 'UPDATE ' . TOPICS_TABLE . '

Line 500Line 500
	}

$cache->destroy('sql', MODERATOR_CACHE_TABLE);

	}

$cache->destroy('sql', MODERATOR_CACHE_TABLE);

 

// Change user_id to anonymous for posts edited by this user
$sql = 'UPDATE ' . POSTS_TABLE . '
SET post_edit_user = ' . ANONYMOUS . '
WHERE post_edit_user = ' . $user_id;
$db->sql_query($sql);

// Change user_id to anonymous for pms edited by this user
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
SET message_edit_user = ' . ANONYMOUS . '
WHERE message_edit_user = ' . $user_id;
$db->sql_query($sql);


// Delete user log entries about this user
$sql = 'DELETE FROM ' . LOG_TABLE . '


// Delete user log entries about this user
$sql = 'DELETE FROM ' . LOG_TABLE . '