Vergleich inc/datahandlers/user.php - 1.8.15 - 1.8.22

  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']
|| strpos($user['password'], $user['email']) !== false || strpos($user['password'], $user['username']) !== false
|| strpos($user['email'], $user['password']) !== false || strpos($user['username'], $user['password']) !== false)

		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 378Zeile 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 470Zeile 473
		if(isset($user['threadnum']) && $user['threadnum'] < 0)
{
$this->set_error("invalid_threadnum");

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

			return false;
}

return true;
}


			return false;
}

return true;
}


	/**
* Verifies if a profile fields are filled in correctly.
*

	/**
* Verifies if a profile fields are filled in correctly.
*

Zeile 564Zeile 567
					if(!in_array(htmlspecialchars_uni($profile_fields[$field]), $expoptions) && trim($profile_fields[$field]) != "")
{
$this->set_error('bad_profile_field_values', array($profilefield['name']));

					if(!in_array(htmlspecialchars_uni($profile_fields[$field]), $expoptions) && trim($profile_fields[$field]) != "")
{
$this->set_error('bad_profile_field_values', array($profilefield['name']));

					}

					}

					$options = $db->escape_string($profile_fields[$field]);
}
else

					$options = $db->escape_string($profile_fields[$field]);
}
else

Zeile 611Zeile 614
			}

$user['referrer_uid'] = $referrer['uid'];

			}

$user['referrer_uid'] = $referrer['uid'];

		}
else
{
$user['referrer_uid'] = 0;
}


		}
else
{
$user['referrer_uid'] = 0;
}


		return true;
}


		return true;
}


Zeile 683Zeile 686
		{
$options['dst'] = 1;
}

		{
$options['dst'] = 1;
}

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

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

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

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

Zeile 706Zeile 709
			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 758Zeile 761

/**
* Verifies if a registration date is valid or not.


/**
* Verifies if a registration date is valid or not.

	 *

	 *

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

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

Zeile 768Zeile 771
		$regdate = (int)$regdate;
// If the timestamp is below 0, set it to the current time.
if($regdate <= 0)

		$regdate = (int)$regdate;
// If the timestamp is below 0, set it to the current time.
if($regdate <= 0)

		{

		{

			$regdate = TIME_NOW;
}
return true;

			$regdate = TIME_NOW;
}
return true;

Zeile 776Zeile 779

/**
* 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 786Zeile 789
		$lastvisit = (int)$lastvisit;
// If the timestamp is below 0, set it to the current time.
if($lastvisit <= 0)

		$lastvisit = (int)$lastvisit;
// If the timestamp is below 0, set it to the current time.
if($lastvisit <= 0)

		{

		{

			$lastvisit = TIME_NOW;
}
return true;

			$lastvisit = TIME_NOW;
}
return true;





	}

/**
* 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.
*/
function verify_lastactive()

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

Zeile 831Zeile 834
			$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)
{

Zeile 1084Zeile 1095

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

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

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

		foreach($array as $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 1112Zeile 1129
			"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 1172Zeile 1187
		{
$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 1272Zeile 1287
		}
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 1326Zeile 1341
		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['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']))
{

Zeile 1744Zeile 1751
			"website" => "",
"birthday" => "",
"icq" => "",

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

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

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

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

Zeile 1823Zeile 1828

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
{