Vergleich inc/datahandlers/user.php - 1.4.6 - 1.4.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: user.php 4338 2009-04-03 23:26:21Z Tikitiki $

 * $Id: user.php 4384 2009-06-19 11:49:42Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 220Zeile 220
		$user = &$this->data;
return true;
}

		$user = &$this->data;
return true;
}

 
	

	/**
* Verifies if an email address is valid or not.
*

	/**
* Verifies if an email address is valid or not.
*

Zeile 228Zeile 229
	function verify_email()
{
global $mybb;

	function verify_email()
{
global $mybb;





		$user = &$this->data;

		$user = &$this->data;





		// Check if an email address has actually been entered.
if(trim($user['email']) == '')
{
$this->set_error('missing_email');

		// Check if an email address has actually been entered.
if(trim($user['email']) == '')
{
$this->set_error('missing_email');

			return false;
}


			return false;
}


		// Check if this is a proper email address.
if(!validate_email_format($user['email']))

		// Check if this is a proper email address.
if(!validate_email_format($user['email']))

		{

		{

			$this->set_error('invalid_email_format');

			$this->set_error('invalid_email_format');

			return false;

			return false;

		}

// Check banned emails

		}

// Check banned emails

Zeile 255Zeile 256
		// Check signed up emails
// Ignore the ACP because the Merge System sometimes produces users with duplicate email addresses (Not A Bug)
if($mybb->settings['allowmultipleemails'] == 0 && !defined("IN_ADMINCP"))

		// Check signed up emails
// Ignore the ACP because the Merge System sometimes produces users with duplicate email addresses (Not A Bug)
if($mybb->settings['allowmultipleemails'] == 0 && !defined("IN_ADMINCP"))

		{

		{

			if(email_already_in_use($user['email'], $user['uid']))
{
$this->set_error('email_already_in_use');
return false;
}

			if(email_already_in_use($user['email'], $user['uid']))
{
$this->set_error('email_already_in_use');
return false;
}

		}


		}


		// If we have an "email2", verify it matches the existing email
if(isset($user['email2']) && $user['email'] != $user['email2'])
{

		// If we have an "email2", verify it matches the existing email
if(isset($user['email2']) && $user['email'] != $user['email2'])
{

Zeile 273Zeile 274

/**
* Verifies if a website is valid or not.


/**
* Verifies if a website is valid or not.

	*

	*

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

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

Zeile 308Zeile 309
		if($icq != '' && !is_numeric($icq))
{
$this->set_error("invalid_icq_number");

		if($icq != '' && !is_numeric($icq))
{
$this->set_error("invalid_icq_number");

			return false;

			return false;

		}
$icq = intval($icq);
return true;
}

		}
$icq = intval($icq);
return true;
}





	/**
* Verifies if an MSN Messenger address is valid or not.
*

	/**
* Verifies if an MSN Messenger address is valid or not.
*

Zeile 326Zeile 327
		if($msn != '' && validate_email_format($msn) == false)
{
$this->set_error("invalid_msn_address");

		if($msn != '' && validate_email_format($msn) == false)
{
$this->set_error("invalid_msn_address");

			return false;

			return false;

		}
return true;
}

		}
return true;
}

Zeile 344Zeile 345
		$birthday = &$user['birthday'];

if(!is_array($birthday))

		$birthday = &$user['birthday'];

if(!is_array($birthday))

		{

		{

			return true;

			return true;

		}


		}


		// Sanitize any input we have
$birthday['day'] = intval($birthday['day']);
$birthday['month'] = intval($birthday['month']);
$birthday['year'] = intval($birthday['year']);

// Error if a day and month exists, and the birthday day and range is not in range

		// Sanitize any input we have
$birthday['day'] = intval($birthday['day']);
$birthday['month'] = intval($birthday['month']);
$birthday['year'] = intval($birthday['year']);

// Error if a day and month exists, and the birthday day and range is not in range

		if($birthday['day'] && $birthday['month'])
{
if($birthday['day'] < 1 || $birthday['day'] > 31 || $birthday['month'] < 1 || $birthday['month'] > 12 || ($birthday['month'] == 2 && $birthday['day'] > 29))
{
$this->set_error("invalid_birthday");
return false;
}

		if($birthday['day'] < 1 || $birthday['day'] > 31 || $birthday['month'] < 1 || $birthday['month'] > 12 || ($birthday['month'] == 2 && $birthday['day'] > 29))
{
$this->set_error("invalid_birthday");
return false;
}







			// Check if the day actually exists.
$months = get_bdays($birthday['year']);
if($birthday['day'] > $months[$birthday['month']-1])
{
$this->set_error("invalid_birthday");
return false;
}

		// Check if the day actually exists.
$months = get_bdays($birthday['year']);
if($birthday['day'] > $months[$birthday['month']-1])
{
$this->set_error("invalid_birthday");
return false;


		}

// Error if a year exists and the year is out of range

		}

// Error if a year exists and the year is out of range

Zeile 1108Zeile 1106
		}
if(isset($user['birthdayprivacy']))
{

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

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

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

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

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