Vergleich inc/datahandlers/user.php - 1.8.16 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 439Zeile 439
		{
$this->set_error("invalid_birthday_privacy");
return false;

		{
$this->set_error("invalid_birthday_privacy");
return false;

 
		}
else if ($birthdayprivacy == 'age')
{
$birthdayyear = &$this->data['birthday']['year'];
if(empty($birthdayyear))
{
$this->set_error("conflicted_birthday_privacy");
return false;
}

		}
return true;
}

/**
* Verifies if the post count field is filled in correctly.

		}
return true;
}

/**
* Verifies if the post count field is filled in correctly.

	*
* @return boolean True when valid, false when invalid.
*/

	*
* @return boolean True when valid, false when invalid.
*/

	function verify_postnum()
{
$user = &$this->data;

	function verify_postnum()
{
$user = &$this->data;

Zeile 455Zeile 464
		if(isset($user['postnum']) && $user['postnum'] < 0)
{
$this->set_error("invalid_postnum");

		if(isset($user['postnum']) && $user['postnum'] < 0)
{
$this->set_error("invalid_postnum");

			return false;

			return false;

		}

		}





		return true;
}

/**
* Verifies if the thread count field is filled in correctly.

		return true;
}

/**
* Verifies if the thread count field is filled in correctly.

	*

	*

	* @return boolean True when valid, false when invalid.
*/
function verify_threadnum()

	* @return boolean True when valid, false when invalid.
*/
function verify_threadnum()

Zeile 471Zeile 480
		$user = &$this->data;

if(isset($user['threadnum']) && $user['threadnum'] < 0)

		$user = &$this->data;

if(isset($user['threadnum']) && $user['threadnum'] < 0)

		{

		{

			$this->set_error("invalid_threadnum");
return false;
}

			$this->set_error("invalid_threadnum");
return false;
}

Zeile 487Zeile 496
	function verify_profile_fields()
{
global $db, $cache;

	function verify_profile_fields()
{
global $db, $cache;





		$user = &$this->data;
$profile_fields = &$this->data['profile_fields'];

		$user = &$this->data;
$profile_fields = &$this->data['profile_fields'];





		// Loop through profile fields checking if they exist or not and are filled in.

// Fetch all profile fields first.
$pfcache = $cache->read('profilefields');

		// Loop through profile fields checking if they exist or not and are filled in.

// Fetch all profile fields first.
$pfcache = $cache->read('profilefields');





		if(is_array($pfcache))
{
// Then loop through the profile fields.
foreach($pfcache as $profilefield)
{
if(isset($this->data['profile_fields_editable']) || isset($this->data['registration']) && ($profilefield['required'] == 1 || $profilefield['registration'] == 1))

		if(is_array($pfcache))
{
// Then loop through the profile fields.
foreach($pfcache as $profilefield)
{
if(isset($this->data['profile_fields_editable']) || isset($this->data['registration']) && ($profilefield['required'] == 1 || $profilefield['registration'] == 1))

				{

				{

					$profilefield['editableby'] = -1;
}


					$profilefield['editableby'] = -1;
}


				if(!is_member($profilefield['editableby'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))


















				if(isset($user['usergroup']))
{
$usergroup = $user['usergroup'];
}
else
{
$usergroup = '';
}
if(isset($user['additionalgroups']))
{
$additionalgroups = $user['additionalgroups'];
}
else
{
$additionalgroups = '';
}

if(!is_member($profilefield['editableby'], array('usergroup' => $usergroup, 'additionalgroups' => $additionalgroups)))

				{
continue;
}

				{
continue;
}

Zeile 603Zeile 629
		$user = &$this->data;

// Does the referrer exist or not?

		$user = &$this->data;

// Does the referrer exist or not?

		if($mybb->settings['usereferrals'] == 1 && $user['referrer'] != '')

		if($mybb->settings['usereferrals'] == 1 && !empty($user['referrer']))

		{
$referrer = get_user_by_username($user['referrer']);


		{
$referrer = get_user_by_username($user['referrer']);


Zeile 633Zeile 659
		global $mybb;

$options = &$this->data['options'];

		global $mybb;

$options = &$this->data['options'];

 

if(!is_array($options))
{
$options = array();
}


// Verify yes/no options.
$this->verify_yesno_option($options, 'allownotices', 1);


// Verify yes/no options.
$this->verify_yesno_option($options, 'allownotices', 1);

Zeile 667Zeile 698
			// Value out of range
$options['subscriptionmethod'] = (int)$options['subscriptionmethod'];
if($options['subscriptionmethod'] < 0 || $options['subscriptionmethod'] > 3)

			// Value out of range
$options['subscriptionmethod'] = (int)$options['subscriptionmethod'];
if($options['subscriptionmethod'] < 0 || $options['subscriptionmethod'] > 3)

			{

			{

				$options['subscriptionmethod'] = 0;

				$options['subscriptionmethod'] = 0;

			}
}


			}
}


		if(array_key_exists('dstcorrection', $options))
{
// Value out of range
$options['dstcorrection'] = (int)$options['dstcorrection'];
if($options['dstcorrection'] < 0 || $options['dstcorrection'] > 2)

		if(array_key_exists('dstcorrection', $options))
{
// Value out of range
$options['dstcorrection'] = (int)$options['dstcorrection'];
if($options['dstcorrection'] < 0 || $options['dstcorrection'] > 2)

			{

			{

				$options['dstcorrection'] = 0;

				$options['dstcorrection'] = 0;

			}
}

if($options['dstcorrection'] == 1)
{
$options['dst'] = 1;
}
elseif($options['dstcorrection'] == 0)
{
$options['dst'] = 0;
}

if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "linear" && $options['threadmode'] != "threaded"))

			}

if($options['dstcorrection'] == 1)
{
$options['dst'] = 1;
}
elseif($options['dstcorrection'] == 0)
{
$options['dst'] = 0;
}
}

if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "linear" && $options['threadmode'] != "threaded" && $options['threadmode'] != ''))

		{

		{

			if($mybb->settings['threadusenetstyle'])
{
$options['threadmode'] = 'threaded';
}
else
{
$options['threadmode'] = 'linear';
}

			$options['threadmode'] = '';








		}

// Verify the "threads per page" option.

		}

// Verify the "threads per page" option.

Zeile 717Zeile 741
				$biggest = $explodedtpp[count($explodedtpp)-1];
// Is the selected option greater than the allowed options?
if($options['tpp'] > $biggest)

				$biggest = $explodedtpp[count($explodedtpp)-1];
// Is the selected option greater than the allowed options?
if($options['tpp'] > $biggest)

				{

				{

					$options['tpp'] = $biggest;
}
}

					$options['tpp'] = $biggest;
}
}

Zeile 791Zeile 815
		if($lastvisit <= 0)
{
$lastvisit = TIME_NOW;

		if($lastvisit <= 0)
{
$lastvisit = TIME_NOW;

		}
return true;

}


		}
return true;

}


	/**
* Verifies if a last active date is valid or not.
*

	/**
* Verifies if a last active date is valid or not.
*

Zeile 810Zeile 834
		if($lastactive <= 0)
{
$lastactive = TIME_NOW;

		if($lastactive <= 0)
{
$lastactive = TIME_NOW;

		}
return true;

}

/**

		}
return true;

}

/**

	 * Verifies if an away mode status is valid or not.
*
* @return boolean True when valid, false when invalid.

	 * Verifies if an away mode status is valid or not.
*
* @return boolean True when valid, false when invalid.

Zeile 879Zeile 903

/**
* Verifies if a style is valid for this user or not.


/**
* Verifies if a style is valid for this user or not.

	 *

	 *

	 * @return boolean True when valid, false when invalid.
*/
function verify_style()

	 * @return boolean True when valid, false when invalid.
*/
function verify_style()

Zeile 888Zeile 912

$user = &$this->data;



$user = &$this->data;


		if($user['style'])

		if(!empty($user['style']))

		{
$theme = get_theme($user['style']);

		{
$theme = get_theme($user['style']);





			if(empty($theme) || !is_member($theme['allowedgroups'], $user) && $theme['allowedgroups'] != 'all')
{
$this->set_error('invalid_style');
return false;

			if(empty($theme) || !is_member($theme['allowedgroups'], $user) && $theme['allowedgroups'] != 'all')
{
$this->set_error('invalid_style');
return false;

			}
}

return true;
}

/**

			}
}

return true;
}

/**

	 * Verifies if this is coming from a spam bot or not
*
* @return boolean True when valid, false when invalid.

	 * Verifies if this is coming from a spam bot or not
*
* @return boolean True when valid, false when invalid.

Zeile 928Zeile 952
	 */
function verify_timezone()
{

	 */
function verify_timezone()
{

 
		global $mybb;


		$user = &$this->data;

$timezones = get_supported_timezones();


		$user = &$this->data;

$timezones = get_supported_timezones();


		if(!array_key_exists($user['timezone'], $timezones))

		if(!isset($user['timezone']) || !array_key_exists($user['timezone'], $timezones))

		{
$user['timezone'] = $mybb->settings['timezoneoffset'];
return false;

		{
$user['timezone'] = $mybb->settings['timezoneoffset'];
return false;

Zeile 967Zeile 993
				$this->verify_username_exists();
}
else

				$this->verify_username_exists();
}
else

			{

			{

				unset($user['username']);
}

				unset($user['username']);
}

		}

		}

		if($this->method == "insert" || array_key_exists('usertitle', $user))

		if($this->method == "insert" || array_key_exists('usertitle', $user))

		{

		{

			$this->verify_usertitle();

			$this->verify_usertitle();

		}

		}

		if($this->method == "insert" || array_key_exists('password', $user))

		if($this->method == "insert" || array_key_exists('password', $user))

		{

		{

			$this->verify_password();

			$this->verify_password();

		}

		}

		if($this->method == "insert" || array_key_exists('usergroup', $user))
{
$this->verify_usergroup();
}
if($this->method == "insert" || array_key_exists('email', $user))

		if($this->method == "insert" || array_key_exists('usergroup', $user))
{
$this->verify_usergroup();
}
if($this->method == "insert" || array_key_exists('email', $user))

		{

		{

			$this->verify_email();
}
if($this->method == "insert" || array_key_exists('website', $user))

			$this->verify_email();
}
if($this->method == "insert" || array_key_exists('website', $user))

Zeile 1034Zeile 1060
		if($this->method == "insert" || array_key_exists('away', $user))
{
$this->verify_away();

		if($this->method == "insert" || array_key_exists('away', $user))
{
$this->verify_away();

		}

		}

		if($this->method == "insert" || array_key_exists('language', $user))
{
$this->verify_language();

		if($this->method == "insert" || array_key_exists('language', $user))
{
$this->verify_language();

Zeile 1067Zeile 1093
		if(count($this->get_errors()) > 0)
{
return false;

		if(count($this->get_errors()) > 0)
{
return false;

		}

		}

		else
{
return true;

		else
{
return true;

Zeile 1095Zeile 1121

$user = &$this->data;



$user = &$this->data;


		$array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'yahoo', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad');

		$array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad', 'regip', 'lastip', 'coppa_user');

		foreach($array as $value)
{
if(!isset($user[$value]))
{
$user[$value] = '';
}

		foreach($array as $value)
{
if(!isset($user[$value]))
{
$user[$value] = '';
}

 
		}

$array = array('subscriptionmethod', 'dstcorrection');
foreach($array as $value)
{
if(!isset($user['options'][$value]))
{
$user['options'][$value] = '';
}
}

// If user is being created from ACP, there is no last visit or last active
if(defined('IN_ADMINCP'))
{
$user['lastvisit'] = $user['lastactive'] = 0;

		}

$this->user_insert_data = array(

		}

$this->user_insert_data = array(

Zeile 1123Zeile 1164
			"lastvisit" => (int)$user['lastvisit'],
"website" => $db->escape_string($user['website']),
"icq" => (int)$user['icq'],

			"lastvisit" => (int)$user['lastvisit'],
"website" => $db->escape_string($user['website']),
"icq" => (int)$user['icq'],

			"yahoo" => $db->escape_string($user['yahoo']),

 
			"skype" => $db->escape_string($user['skype']),
"google" => $db->escape_string($user['google']),
"birthday" => $user['bday'],

			"skype" => $db->escape_string($user['skype']),
"google" => $db->escape_string($user['google']),
"birthday" => $user['bday'],

Zeile 1152Zeile 1192
			"dateformat" => $db->escape_string($user['dateformat']),
"timeformat" => $db->escape_string($user['timeformat']),
"regip" => $db->escape_binary($user['regip']),

			"dateformat" => $db->escape_string($user['dateformat']),
"timeformat" => $db->escape_string($user['timeformat']),
"regip" => $db->escape_binary($user['regip']),

 
			"lastip" => $db->escape_binary($user['lastip']),

			"language" => $db->escape_string($user['language']),
"showcodebuttons" => (int)$user['options']['showcodebuttons'],
"sourceeditor" => (int)$user['options']['sourceeditor'],

			"language" => $db->escape_string($user['language']),
"showcodebuttons" => (int)$user['options']['showcodebuttons'],
"sourceeditor" => (int)$user['options']['sourceeditor'],

Zeile 1161Zeile 1202
			"awaydate" => (int)$user['away']['date'],
"returndate" => $user['away']['returndate'],
"awayreason" => $db->escape_string($user['away']['awayreason']),

			"awaydate" => (int)$user['away']['date'],
"returndate" => $user['away']['returndate'],
"awayreason" => $db->escape_string($user['away']['awayreason']),

			"notepad" => $db->escape_string($user['notepad']),

 
			"referrer" => (int)$user['referrer_uid'],
"referrals" => 0,
"buddylist" => '',
"ignorelist" => '',

			"referrer" => (int)$user['referrer_uid'],
"referrals" => 0,
"buddylist" => '',
"ignorelist" => '',

			"pmfolders" => '',

			"pmfolders" => "0**$%%$1**$%%$2**$%%$3**$%%$4**",

			"notepad" => '',
"warningpoints" => 0,
"moderateposts" => 0,

			"notepad" => '',
"warningpoints" => 0,
"moderateposts" => 0,

Zeile 1282Zeile 1322
		}
if(isset($user['email']))
{

		}
if(isset($user['email']))
{

			$this->user_update_data['email'] = $user['email'];

			$this->user_update_data['email'] = $db->escape_string($user['email']);

		}
if(isset($user['postnum']))
{

		}
if(isset($user['postnum']))
{

Zeile 1316Zeile 1356
		if(isset($user['regdate']))
{
$this->user_update_data['regdate'] = (int)$user['regdate'];

		if(isset($user['regdate']))
{
$this->user_update_data['regdate'] = (int)$user['regdate'];

		}

		}

		if(isset($user['lastactive']))

		if(isset($user['lastactive']))

		{

		{

			$this->user_update_data['lastactive'] = (int)$user['lastactive'];

			$this->user_update_data['lastactive'] = (int)$user['lastactive'];

		}

		}

		if(isset($user['lastvisit']))
{
$this->user_update_data['lastvisit'] = (int)$user['lastvisit'];

		if(isset($user['lastvisit']))
{
$this->user_update_data['lastvisit'] = (int)$user['lastvisit'];

Zeile 1328Zeile 1368
		if(isset($user['signature']))
{
$this->user_update_data['signature'] = $db->escape_string($user['signature']);

		if(isset($user['signature']))
{
$this->user_update_data['signature'] = $db->escape_string($user['signature']);

		}

		}

		if(isset($user['website']))

		if(isset($user['website']))

		{

		{

			$this->user_update_data['website'] = $db->escape_string($user['website']);
}
if(isset($user['icq']))
{
$this->user_update_data['icq'] = (int)$user['icq'];

			$this->user_update_data['website'] = $db->escape_string($user['website']);
}
if(isset($user['icq']))
{
$this->user_update_data['icq'] = (int)$user['icq'];

		}
if(isset($user['yahoo']))
{
$this->user_update_data['yahoo'] = $db->escape_string($user['yahoo']);
}

		}





		if(isset($user['skype']))
{
$this->user_update_data['skype'] = $db->escape_string($user['skype']);

		if(isset($user['skype']))
{
$this->user_update_data['skype'] = $db->escape_string($user['skype']);

Zeile 1375Zeile 1411
		}
if(isset($user['regip']))
{

		}
if(isset($user['regip']))
{

			$this->user_update_data['regip'] = $db->escape_string($user['regip']);





			$this->user_update_data['regip'] = $db->escape_binary($user['regip']);
}
if(isset($user['lastip']))
{
$this->user_update_data['lastip'] = $db->escape_binary($user['lastip']);

		}
if(isset($user['language']))
{

		}
if(isset($user['language']))
{

Zeile 1411Zeile 1451
		$old_user = get_user($user['uid']);

// If old user has new pmnotice and new user has = yes, keep old value

		$old_user = get_user($user['uid']);

// If old user has new pmnotice and new user has = yes, keep old value

		if($old_user['pmnotice'] == "2" && $this->user_update_data['pmnotice'] == 1)

		if(isset($this->user_update_data['pmnotice']) && $old_user['pmnotice'] == "2" && $this->user_update_data['pmnotice'] == 1)

		{
unset($this->user_update_data['pmnotice']);
}

		{
unset($this->user_update_data['pmnotice']);
}

Zeile 1427Zeile 1467
		{
// Actual updating happens here.
$db->update_query("users", $this->user_update_data, "uid='{$user['uid']}'");

		{
// Actual updating happens here.
$db->update_query("users", $this->user_update_data, "uid='{$user['uid']}'");

		}


		}


		$cache->update_moderators();
if(isset($user['bday']) || isset($user['username']))

		$cache->update_moderators();
if(isset($user['bday']) || isset($user['username']))

		{

		{

			$cache->update_birthdays();

			$cache->update_birthdays();

		}


		}


		if(isset($user['usergroup']) && (int)$user['usergroup'] == 5)

		if(isset($user['usergroup']) && (int)$user['usergroup'] == 5)

		{

		{

			$cache->update_awaitingactivation();
}


			$cache->update_awaitingactivation();
}


Zeile 1445Zeile 1485
		{
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$fields = $db->fetch_array($query);

		{
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$fields = $db->fetch_array($query);

			if(!$fields['ufid'])

			if(empty($fields['ufid']))

			{
$user_fields = array(
'ufid' => $user['uid']
);

			{
$user_fields = array(
'ufid' => $user['uid']
);





				$fields_array = $db->show_fields_from("userfields");
foreach($fields_array as $field)
{

				$fields_array = $db->show_fields_from("userfields");
foreach($fields_array as $field)
{

Zeile 1493Zeile 1533

/**
* Provides a method to completely delete a user.


/**
* Provides a method to completely delete a user.

	 *

	 *

	 * @param array $delete_uids Array of user information
* @param integer $prunecontent Whether if delete threads/posts or not
* @return array

	 * @param array $delete_uids Array of user information
* @param integer $prunecontent Whether if delete threads/posts or not
* @return array

Zeile 1501Zeile 1541
	function delete_user($delete_uids, $prunecontent=0)
{
global $db, $plugins, $mybb, $cache;

	function delete_user($delete_uids, $prunecontent=0)
{
global $db, $plugins, $mybb, $cache;





		// Yes, validating is required.
if(count($this->get_errors()) > 0)
{

		// Yes, validating is required.
if(count($this->get_errors()) > 0)
{

Zeile 1513Zeile 1553
		foreach($this->delete_uids as $key => $uid)
{
if(!$uid || is_super_admin($uid) || $uid == $mybb->user['uid'])

		foreach($this->delete_uids as $key => $uid)
{
if(!$uid || is_super_admin($uid) || $uid == $mybb->user['uid'])

			{

			{

				// Remove super admins
unset($this->delete_uids[$key]);
}

				// Remove super admins
unset($this->delete_uids[$key]);
}

		}

$plugins->run_hooks('datahandler_user_delete_start', $this);


		}

$plugins->run_hooks('datahandler_user_delete_start', $this);


		$this->delete_uids = implode(',', $this->delete_uids);

if(empty($this->delete_uids))

		$this->delete_uids = implode(',', $this->delete_uids);

if(empty($this->delete_uids))

Zeile 1534Zeile 1574
		}

$this->delete_content();

		}

$this->delete_content();





		// Delete the user
$query = $db->delete_query('users', "uid IN({$this->delete_uids})");
$this->deleted_users = $db->affected_rows($query);

		// Delete the user
$query = $db->delete_query('users', "uid IN({$this->delete_uids})");
$this->deleted_users = $db->affected_rows($query);

Zeile 1575Zeile 1615
		}

$db->delete_query('threadratings', "uid IN({$this->delete_uids})");

		}

$db->delete_query('threadratings', "uid IN({$this->delete_uids})");





		// Update forums & threads if user is the lastposter
$db->update_query('forums', array('lastposteruid' => 0), "lastposteruid IN({$this->delete_uids})");
$db->update_query('threads', array('lastposteruid' => 0), "lastposteruid IN({$this->delete_uids})");

		// Update forums & threads if user is the lastposter
$db->update_query('forums', array('lastposteruid' => 0), "lastposteruid IN({$this->delete_uids})");
$db->update_query('threads', array('lastposteruid' => 0), "lastposteruid IN({$this->delete_uids})");

Zeile 1590Zeile 1630
		$plugins->run_hooks("datahandler_user_delete_end", $this);

// Update cache

		$plugins->run_hooks("datahandler_user_delete_end", $this);

// Update cache

		$cache->update_banned();

 
		$cache->update_moderators();
$cache->update_forumsdisplay();
$cache->update_reportedcontent();

		$cache->update_moderators();
$cache->update_forumsdisplay();
$cache->update_reportedcontent();

Zeile 1660Zeile 1699

// Update the reports made by the deleted users by setting the uid to 0
$db->update_query('reportedcontent', array('uid' => 0), "uid IN({$this->delete_uids})");


// Update the reports made by the deleted users by setting the uid to 0
$db->update_query('reportedcontent', array('uid' => 0), "uid IN({$this->delete_uids})");


// Remove any of the user(s) uploaded avatars
require_once MYBB_ROOT.'inc/functions_upload.php';
foreach(explode(',', $this->delete_uids) as $uid)
{
remove_avatars($uid);
}


// Remove any of the user(s) uploaded avatars
require_once MYBB_ROOT.'inc/functions_upload.php';
foreach(explode(',', $this->delete_uids) as $uid)
{
remove_avatars($uid);
}

	}

/**

	}

/**

Zeile 1675Zeile 1714
	 * @param array|bool $delete_uids Array of user ids, false if they're already set (eg when using the delete_user function)
*/
function delete_posts($delete_uids=false)

	 * @param array|bool $delete_uids Array of user ids, false if they're already set (eg when using the delete_user function)
*/
function delete_posts($delete_uids=false)

	{
global $db, $plugins, $mybb;

if($delete_uids != false)
{
$this->delete_uids = array_map('intval', (array)$delete_uids);

foreach($this->delete_uids as $key => $uid)
{
if(!$uid || is_super_admin($uid) || $uid == $mybb->user['uid'])
{
// Remove super admins
unset($this->delete_uids[$key]);
}

	{
global $db, $plugins, $mybb;

if($delete_uids != false)
{
$this->delete_uids = array_map('intval', (array)$delete_uids);

foreach($this->delete_uids as $key => $uid)
{
if(!$uid || is_super_admin($uid) || $uid == $mybb->user['uid'])
{
// Remove super admins
unset($this->delete_uids[$key]);
}

			}

$this->delete_uids = implode(',', $this->delete_uids);

			}

$this->delete_uids = implode(',', $this->delete_uids);

Zeile 1696Zeile 1735

require_once MYBB_ROOT.'inc/class_moderation.php';
$moderation = new Moderation();


require_once MYBB_ROOT.'inc/class_moderation.php';
$moderation = new Moderation();





		$plugins->run_hooks('datahandler_user_delete_posts', $this);

if(empty($this->delete_uids))

		$plugins->run_hooks('datahandler_user_delete_posts', $this);

if(empty($this->delete_uids))

Zeile 1707Zeile 1746
		// Threads
$query = $db->simple_select('threads', 'tid', "uid IN({$this->delete_uids})");
while($tid = $db->fetch_field($query, 'tid'))

		// Threads
$query = $db->simple_select('threads', 'tid', "uid IN({$this->delete_uids})");
while($tid = $db->fetch_field($query, 'tid'))

		{
$moderation->delete_thread($tid);
}

		{
$moderation->delete_thread($tid);
}


// Posts
$query = $db->simple_select('posts', 'pid', "uid IN({$this->delete_uids})");


// Posts
$query = $db->simple_select('posts', 'pid', "uid IN({$this->delete_uids})");

Zeile 1718Zeile 1757
			$moderation->delete_post($pid);
}
}

			$moderation->delete_post($pid);
}
}





	/**
* Provides a method to clear an users profile
*

	/**
* Provides a method to clear an users profile
*

Zeile 1731Zeile 1770

// delete_uids isn't a nice name, but it's used as the functions above use the same
if($delete_uids != false)


// delete_uids isn't a nice name, but it's used as the functions above use the same
if($delete_uids != false)

		{

		{

			$this->delete_uids = array_map('intval', (array)$delete_uids);

foreach($this->delete_uids as $key => $uid)

			$this->delete_uids = array_map('intval', (array)$delete_uids);

foreach($this->delete_uids as $key => $uid)

Zeile 1750Zeile 1789
			"website" => "",
"birthday" => "",
"icq" => "",

			"website" => "",
"birthday" => "",
"icq" => "",

			"yahoo" => "",

 
			"skype" => "",
"google" => "",
"usertitle" => "",

			"skype" => "",
"google" => "",
"usertitle" => "",

Zeile 1792Zeile 1830
	public function verify_signature()
{
global $mybb, $parser;

	public function verify_signature()
{
global $mybb, $parser;

 

if(!isset($this->data['signature']))
{
return true;
}


if(!isset($parser))
{


if(!isset($parser))
{

Zeile 1801Zeile 1844

$parser_options = array(
'allow_html' => $mybb->settings['sightml'],


$parser_options = array(
'allow_html' => $mybb->settings['sightml'],

			'filter_badwords' => 1,

 
			'allow_mycode' => $mybb->settings['sigmycode'],
'allow_smilies' => $mybb->settings['sigsmilies'],
'allow_imgcode' => $mybb->settings['sigimgcode'],

			'allow_mycode' => $mybb->settings['sigmycode'],
'allow_smilies' => $mybb->settings['sigsmilies'],
'allow_imgcode' => $mybb->settings['sigimgcode'],

Zeile 1819Zeile 1861
			$imgsallowed = 0;

if($mybb->settings['sigimgcode'] == 1)

			$imgsallowed = 0;

if($mybb->settings['sigimgcode'] == 1)

			{

			{

				$imgsallowed = $mybb->settings['maxsigimages'];
}

				$imgsallowed = $mybb->settings['maxsigimages'];
}





			$this->set_error('too_many_sig_images2', array($imgsallowed));

			$this->set_error('too_many_sig_images2', array($imgsallowed));

		}


		}


		if($mybb->settings['sigcountmycode'] == 0)

		if($mybb->settings['sigcountmycode'] == 0)

		{
$parsed_sig = $parser->text_parse_message($this->data['signature']);

		{
$parsed_sig = $parser->text_parse_message($this->data['signature'], array('signature_parse' => '1'));

		}
else

		}
else

		{

		{

			$parsed_sig = $this->data['signature'];
}


			$parsed_sig = $this->data['signature'];
}


		$parsed_sig = preg_replace("#\s#", "", $parsed_sig);
$sig_length = my_strlen($parsed_sig);

if($sig_length > $mybb->settings['siglength'])

		if($mybb->settings['siglength'] > 0)




		{

		{

			$this->set_error('sig_too_long', array($mybb->settings['siglength']));


			$parsed_sig = preg_replace("#\s#", "", $parsed_sig);
$sig_length = my_strlen($parsed_sig);





			if($sig_length - $mybb->settings['siglength'] > 1)

			if($sig_length > $mybb->settings['siglength'])

			{

			{

				$this->set_error('sig_remove_chars_plural', array($sig_length-$mybb->settings['siglength']));
}
else
{
$this->set_error('sig_remove_chars_singular');






				$this->set_error('sig_too_long', array($mybb->settings['siglength']));

if($sig_length - $mybb->settings['siglength'] > 1)
{
$this->set_error('sig_remove_chars_plural', array($sig_length-$mybb->settings['siglength']));
}
else
{
$this->set_error('sig_remove_chars_singular');
}

			}
}


			}
}