Vergleich inc/datahandlers/user.php - 1.8.12 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 187Zeile 187
		}

// Has the user tried to use their email address or username as a password?

		}

// Has the user tried to use their email address or username as a password?

		if($user['email'] === $user['password'] || $user['username'] === $user['password'])

		if(!empty($user['email']) && !empty($user['username']))

		{

		{

			$this->set_error('bad_password_security');
return false;






			if($user['email'] === $user['password'] || $user['username'] === $user['password']
|| strpos($user['password'], $user['email']) !== false || strpos($user['password'], $user['username']) !== false
|| strpos($user['email'], $user['password']) !== false || strpos($user['username'], $user['password']) !== false)
{
$this->set_error('bad_password_security');
return false;
}

		}

// See if the board has "require complex passwords" enabled.

		}

// See if the board has "require complex passwords" enabled.

Zeile 376Zeile 381
			$this->set_error("invalid_birthday");
return false;
}

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

		else if($birthday['year'] == date("Y"))

		elseif($birthday['year'] == date("Y"))

		{
// Error if birth date is in future
if($birthday['month'] > date("m") || ($birthday['month'] == date("m") && $birthday['day'] > date("d")))

		{
// Error if birth date is in future
if($birthday['month'] > date("m") || ($birthday['month'] == date("m") && $birthday['day'] > date("d")))

Zeile 434Zeile 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;
}

		}
return true;
}





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

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

Zeile 450Zeile 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 true;
}

			return false;
}

return true;
}


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


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

Zeile 464Zeile 478
	function verify_threadnum()
{
$user = &$this->data;

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





		if(isset($user['threadnum']) && $user['threadnum'] < 0)
{
$this->set_error("invalid_threadnum");
return false;

		if(isset($user['threadnum']) && $user['threadnum'] < 0)
{
$this->set_error("invalid_threadnum");
return false;

		}

return true;
}

/**

		}

return true;
}

/**

	* Verifies if a profile fields are filled in correctly.
*
* @return boolean True when valid, false when invalid.

	* Verifies if a profile fields are filled in correctly.
*
* @return boolean True when valid, false when invalid.

Zeile 501Zeile 515
					$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 534Zeile 565
				elseif(($type == "multiselect" || $type == "checkbox") && $profile_fields[$field] == "" && $profilefield['required'] == 1 && !defined('IN_ADMINCP') && THIS_SCRIPT != "modcp.php")
{
$this->set_error('missing_required_profile_field', array($profilefield['name']));

				elseif(($type == "multiselect" || $type == "checkbox") && $profile_fields[$field] == "" && $profilefield['required'] == 1 && !defined('IN_ADMINCP') && THIS_SCRIPT != "modcp.php")
{
$this->set_error('missing_required_profile_field', array($profilefield['name']));

				}


				}


				// Sort out multiselect/checkbox profile fields.
$options = '';
if(($type == "multiselect" || $type == "checkbox") && is_array($profile_fields[$field]))

				// Sort out multiselect/checkbox profile fields.
$options = '';
if(($type == "multiselect" || $type == "checkbox") && is_array($profile_fields[$field]))

Zeile 572Zeile 603
						$this->set_error('max_limit_reached', array($profilefield['name'], $profilefield['maxlength']));
}


						$this->set_error('max_limit_reached', array($profilefield['name'], $profilefield['maxlength']));
}


					if(!empty($profilefield['regex']) && !preg_match("#".$profilefield['regex']."#i", $profile_fields[$field]))

					if(!empty($profilefield['regex']) && !empty($profile_fields[$field]) && !preg_match("#".$profilefield['regex']."#i", $profile_fields[$field]))

					{
$this->set_error('bad_profile_field_value', array($profilefield['name']));
}

					{
$this->set_error('bad_profile_field_value', array($profilefield['name']));
}





					$options = $db->escape_string($profile_fields[$field]);
}
$user['user_fields'][$field] = $options;
}
}

					$options = $db->escape_string($profile_fields[$field]);
}
$user['user_fields'][$field] = $options;
}
}





		return true;
}


		return true;
}


Zeile 594Zeile 625
	function verify_referrer()
{
global $db, $mybb;

	function verify_referrer()
{
global $db, $mybb;


$user = &$this->data;



$user = &$this->data;


		// Does the referrer exist or not?

		// 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 628Zeile 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 664Zeile 700
			if($options['subscriptionmethod'] < 0 || $options['subscriptionmethod'] > 3)
{
$options['subscriptionmethod'] = 0;

			if($options['subscriptionmethod'] < 0 || $options['subscriptionmethod'] > 3)
{
$options['subscriptionmethod'] = 0;

			}
}


			}
}


		if(array_key_exists('dstcorrection', $options))
{
// Value out of range

		if(array_key_exists('dstcorrection', $options))
{
// Value out of range

Zeile 675Zeile 711
			{
$options['dstcorrection'] = 0;
}

			{
$options['dstcorrection'] = 0;
}

		}

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

if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "linear" && $options['threadmode'] != "threaded"))
{
if($mybb->settings['threadusenetstyle'])
{
$options['threadmode'] = 'threaded';
}
else


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













			{

			{

				$options['threadmode'] = 'linear';

				$options['dst'] = 0;

			}

			}

 
		}

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

		}

// Verify the "threads per page" option.

		}

// Verify the "threads per page" option.

Zeile 704Zeile 733
			if(!isset($options['tpp']))
{
$options['tpp'] = 0;

			if(!isset($options['tpp']))
{
$options['tpp'] = 0;

			}

			}

			$explodedtpp = explode(",", $mybb->settings['usertppoptions']);
if(is_array($explodedtpp))
{

			$explodedtpp = explode(",", $mybb->settings['usertppoptions']);
if(is_array($explodedtpp))
{

Zeile 752Zeile 781
			}
}
$this->data['options'] = $options;

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

	}

/**

	}

/**

	 * Verifies if a registration date is valid or not.
*
* @return boolean True when valid, false when invalid.

	 * Verifies if a registration date is valid or not.
*
* @return boolean True when valid, false when invalid.

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

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

		}
return true;

		}
return true;


}



}


Zeile 829Zeile 858
			$user['away']['awayreason'] = '';
return true;
}

			$user['away']['awayreason'] = '';
return true;
}

		else if($user['away']['returndate'])

		elseif($user['away']['returndate'])

		{

		{

 
			// Validate the awayreason length, since the db holds 200 chars for this field
$reasonlength = my_strlen($user['away']['awayreason']);
if($reasonlength > 200)
{
$this->set_error("away_too_long", array($reasonlength - 200));
return false;
}


			list($returnday, $returnmonth, $returnyear) = explode('-', $user['away']['returndate']);
if(!$returnday || !$returnmonth || !$returnyear)

			list($returnday, $returnmonth, $returnyear) = explode('-', $user['away']['returndate']);
if(!$returnday || !$returnmonth || !$returnyear)

			{

			{

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

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

Zeile 875Zeile 912

$user = &$this->data;



$user = &$this->data;


		if($user['style'])

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

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


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


Zeile 883Zeile 920
			{
$this->set_error('invalid_style');
return false;

			{
$this->set_error('invalid_style');
return false;

			}
}

			}
}


return true;
}


return true;
}

Zeile 915Zeile 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 936Zeile 975
	function validate_user()
{
global $mybb, $plugins;

	function validate_user()
{
global $mybb, $plugins;





		$user = &$this->data;

// First, grab the old user details if this user exists
if(!empty($user['uid']))
{
$old_user = get_user($user['uid']);

		$user = &$this->data;

// First, grab the old user details if this user exists
if(!empty($user['uid']))
{
$old_user = get_user($user['uid']);

		}

		}


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


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

		{

		{

			// If the username is the same - no need to verify
if(!isset($old_user['username']) || $user['username'] != $old_user['username'])

			// If the username is the same - no need to verify
if(!isset($old_user['username']) || $user['username'] != $old_user['username'])

			{

			{

				$this->verify_username();
$this->verify_username_exists();

				$this->verify_username();
$this->verify_username_exists();

			}

			}

			else
{
unset($user['username']);

			else
{
unset($user['username']);

Zeile 961Zeile 1000
		if($this->method == "insert" || array_key_exists('usertitle', $user))
{
$this->verify_usertitle();

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

		}

		}

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

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

Zeile 1011Zeile 1050
			$this->verify_regdate();
}
if($this->method == "insert" || array_key_exists('lastvisit', $user))

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

		{

		{

			$this->verify_lastvisit();

			$this->verify_lastvisit();

		}

		}

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

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

		{

		{

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

			$this->verify_lastactive();
}
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 1078Zeile 1117
		if(count($this->get_errors()) > 0)
{
die("The user is not valid.");

		if(count($this->get_errors()) > 0)
{
die("The user is not valid.");

		}

		}


$user = &$this->data;


$user = &$this->data;


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


$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]))

			if(!isset($user[$value]))

			{

			{

				$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 1110Zeile 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'],

			"aim" => $db->escape_string($user['aim']),
"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 1140Zeile 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 1149Zeile 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 1170Zeile 1222
		{
$this->user_insert_data['dst'] = 1;
}

		{
$this->user_insert_data['dst'] = 1;
}

		else if($user['options']['dstcorrection'] == 0)

		elseif($user['options']['dstcorrection'] == 0)

		{
$this->user_insert_data['dst'] = 0;
}

		{
$this->user_insert_data['dst'] = 0;
}

Zeile 1270Zeile 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 1325Zeile 1377
		{
$this->user_update_data['icq'] = (int)$user['icq'];
}

		{
$this->user_update_data['icq'] = (int)$user['icq'];
}

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

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









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

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

		{

		{

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

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

		}

		}

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

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

		{

		{

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

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

		}

		}

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

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

		}

		}

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

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

		}

		}

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

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

		{

		{

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

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

		}

		}

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

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

		}

		}

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

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

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

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

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

Zeile 1389Zeile 1437
			$this->user_update_data['usernotes'] = $db->escape_string($user['usernotes']);
}
if(isset($user['options']) && is_array($user['options']))

			$this->user_update_data['usernotes'] = $db->escape_string($user['usernotes']);
}
if(isset($user['options']) && is_array($user['options']))

		{

		{

			foreach($user['options'] as $option => $value)
{
$this->user_update_data[$option] = $value;
}

			foreach($user['options'] as $option => $value)
{
$this->user_update_data[$option] = $value;
}

		}

		}

		if(array_key_exists('coppa_user', $user))
{
$this->user_update_data['coppauser'] = (int)$user['coppa_user'];
}
// First, grab the old user details for later use.
$old_user = get_user($user['uid']);

		if(array_key_exists('coppa_user', $user))
{
$this->user_update_data['coppauser'] = (int)$user['coppa_user'];
}
// First, grab the old user details for later use.
$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)
{
unset($this->user_update_data['pmnotice']);

		// 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)
{
unset($this->user_update_data['pmnotice']);

		}

		}


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

if(count($this->user_update_data) < 1 && empty($user['user_fields']))
{
return false;


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

if(count($this->user_update_data) < 1 && empty($user['user_fields']))
{
return false;

		}

		}


if(count($this->user_update_data) > 0)


if(count($this->user_update_data) > 0)

		{

		{

			// 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_birthdays();


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

		}

		}


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


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

Zeile 1437Zeile 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']

Zeile 1582Zeile 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 1742Zeile 1789
			"website" => "",
"birthday" => "",
"icq" => "",

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

			"aim" => "",
"yahoo" => "",

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

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

Zeile 1785Zeile 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))
{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;


if(!isset($parser))
{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;

		}


		}


		$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 1810Zeile 1859
		)
{
$imgsallowed = 0;

		)
{
$imgsallowed = 0;





			if($mybb->settings['sigimgcode'] == 1)
{
$imgsallowed = $mybb->settings['maxsigimages'];

			if($mybb->settings['sigimgcode'] == 1)
{
$imgsallowed = $mybb->settings['maxsigimages'];

Zeile 1821Zeile 1870

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
{
$parsed_sig = $this->data['signature'];
}


		}
else
{
$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');
}

			}
}


			}
}