Vergleich inc/datahandlers/user.php - 1.8.20 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 691Zeile 691
			$options['dst'] = 0;
}


			$options['dst'] = 0;
}


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

		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 719Zeile 712
				if($options['tpp'] > $biggest)
{
$options['tpp'] = $biggest;

				if($options['tpp'] > $biggest)
{
$options['tpp'] = $biggest;

				}
}

				}
}

			$options['tpp'] = (int)$options['tpp'];
}
// Verify the "posts per page" option.

			$options['tpp'] = (int)$options['tpp'];
}
// Verify the "posts per page" option.

Zeile 740Zeile 733
				{
$options['ppp'] = $biggest;
}

				{
$options['ppp'] = $biggest;
}

			}

			}

			$options['ppp'] = (int)$options['ppp'];
}
// Is our selected "days prune" option valid or not?

			$options['ppp'] = (int)$options['ppp'];
}
// Is our selected "days prune" option valid or not?

Zeile 779Zeile 772

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


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

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

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

	 */
function verify_lastvisit()
{

	 */
function verify_lastvisit()
{

Zeile 798Zeile 791

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


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

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

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

	function verify_lastactive()
{
$lastactive = &$this->data['lastactive'];

	function verify_lastactive()
{
$lastactive = &$this->data['lastactive'];

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

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

		}

		}

		return true;

}

		return true;

}

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

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





			// Validate the return date lengths
$user['away']['returndate'] = substr($returnday, 0, 2).'-'.substr($returnmonth, 0, 2).'-'.substr($returnyear, 0, 4);
}

			// Validate the return date lengths
$user['away']['returndate'] = substr($returnday, 0, 2).'-'.substr($returnmonth, 0, 2).'-'.substr($returnyear, 0, 4);
}

Zeile 859Zeile 852

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


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

	 *

	 *

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

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

	{
global $lang;

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

// An invalid language has been specified?

	{
global $lang;

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

// An invalid language has been specified?

		if($language != '' && !$lang->language_exists($language))
{
$this->set_error("invalid_language");

		if($language != '' && !$lang->language_exists($language))
{
$this->set_error("invalid_language");

			return false;
}
return true;
}

/**

			return false;
}
return true;
}

/**

	 * Verifies if a style is valid for this user or not.
*
* @return boolean True when valid, false when invalid.

	 * Verifies if a style is valid for this user or not.
*
* @return boolean True when valid, false when invalid.

Zeile 885Zeile 878
	function verify_style()
{
global $lang;

	function verify_style()
{
global $lang;


$user = &$this->data;



$user = &$this->data;


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

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

Zeile 906Zeile 899
	 * 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.

	 */

	 */

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

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

Zeile 915Zeile 908
		if($user['regcheck1'] !== "" || $user['regcheck2'] !== "true")
{
$this->set_error("invalid_checkfield");

		if($user['regcheck1'] !== "" || $user['regcheck2'] !== "true")
{
$this->set_error("invalid_checkfield");

			return false;

			return false;

		}
return true;
}

		}
return true;
}

Zeile 928Zeile 921
	 */
function verify_timezone()
{

	 */
function verify_timezone()
{

 
		global $mybb;


		$user = &$this->data;

		$user = &$this->data;





		$timezones = get_supported_timezones();

		$timezones = get_supported_timezones();





		if(!array_key_exists($user['timezone'], $timezones))
{
$user['timezone'] = $mybb->settings['timezoneoffset'];

		if(!array_key_exists($user['timezone'], $timezones))
{
$user['timezone'] = $mybb->settings['timezoneoffset'];

			return false;
}


			return false;
}


		return true;
}


		return true;
}


Zeile 1016Zeile 1011
			$this->verify_referrer();
}
if($this->method == "insert" || array_key_exists('options', $user))

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

		{

		{

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

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

Zeile 1064Zeile 1059

// We are done validating, return.
$this->set_validated(true);


// We are done validating, return.
$this->set_validated(true);

		if(count($this->get_errors()) > 0)
{

		if(count($this->get_errors()) > 0)
{

			return false;
}
else

			return false;
}
else

Zeile 1085Zeile 1080

// Yes, validating is required.
if(!$this->get_validated())


// Yes, validating is required.
if(!$this->get_validated())

		{

		{

			die("The user needs to be validated before inserting it into the DB.");

			die("The user needs to be validated before inserting it into the DB.");

		}

		}

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

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

		{

		{

			die("The user is not valid.");
}

			die("The user is not valid.");
}





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

		foreach($array as $value)

		foreach($array as $value)

		{

		{

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

			if(!isset($user[$value]))
{
$user[$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 1124
			"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 1166Zeile 1166
			"referrals" => 0,
"buddylist" => '',
"ignorelist" => '',

			"referrals" => 0,
"buddylist" => '',
"ignorelist" => '',

			"pmfolders" => '',

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

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

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

Zeile 1176Zeile 1176
			"coppauser" => (int)$user['coppa_user'],
"classicpostbit" => (int)$user['options']['classicpostbit'],
"usernotes" => ''

			"coppauser" => (int)$user['coppa_user'],
"classicpostbit" => (int)$user['options']['classicpostbit'],
"usernotes" => ''

		);

		);


if($user['options']['dstcorrection'] == 1)
{


if($user['options']['dstcorrection'] == 1)
{

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

		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']))
{

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

Zeile 1590Zeile 1586
		$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 1750Zeile 1745
			"website" => "",
"birthday" => "",
"icq" => "",

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

			"yahoo" => "",

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

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

Zeile 1801Zeile 1795

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