Vergleich inc/datahandlers/user.php - 1.4.0 - 1.4.2

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * 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 4052 2008-07-29 15:45:49Z Tikitiki $

 * $Id: user.php 4162 2008-08-31 16:44:33Z Tikitiki $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 528Zeile 528
		$this->verify_yesno_option($options, 'showavatars', 1);
$this->verify_yesno_option($options, 'showquickreply', 1);
$this->verify_yesno_option($options, 'showredirect', 1);

		$this->verify_yesno_option($options, 'showavatars', 1);
$this->verify_yesno_option($options, 'showquickreply', 1);
$this->verify_yesno_option($options, 'showredirect', 1);

		$this->verify_yesno_option($options, 'classicpostbit', 0);










		
if($mybb->settings['postlayout'] == 'classic')
{
$this->verify_yesno_option($options, 'classicpostbit', 1);
}
else
{
$this->verify_yesno_option($options, 'classicpostbit', 0);
}


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

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

Zeile 585Zeile 593
		}

// Verify the "threads per page" option.

		}

// Verify the "threads per page" option.

		if($this->method == "insert" || (array_key_exists('tpp', $options) && $mybb->settings['usetppoptions']))

		if($this->method == "insert" || (array_key_exists('tpp', $options) && $mybb->settings['usertppoptions']))

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

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

Zeile 686Zeile 694

/**
* Verifies if an away mode status is valid or not.


/**
* Verifies if an away mode status is valid or not.

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

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

	 */
function verify_away()
{

	 */
function verify_away()
{

Zeile 715Zeile 723

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


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

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

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

	function verify_language()
{
global $lang;

	function verify_language()
{
global $lang;

Zeile 766Zeile 774
		if($user['uid'])
{
$old_user = get_user($user['uid']);

		if($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))
{

Zeile 786Zeile 794
			$this->verify_usertitle();
}
if($this->method == "insert" || array_key_exists('password', $user))

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

		{

		{

			$this->verify_password();

			$this->verify_password();

		}

		}

		if($this->method == "insert" || array_key_exists('usergroup', $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();

			$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_website();

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

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

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

		}

		}

		if($this->method == "insert" && array_key_exists('regcheck1', $user) && array_key_exists('regcheck2', $user))
{
$this->verify_checkfields();

		if($this->method == "insert" && array_key_exists('regcheck1', $user) && array_key_exists('regcheck2', $user))
{
$this->verify_checkfields();

Zeile 972Zeile 980
			{
continue;
}

			{
continue;
}

			$user['user_fields']["ufid{$profile_field['fid']}"] = '';

			$user['user_fields']["fid{$profile_field['fid']}"] = '';

		}

$db->insert_query("userfields", $user['user_fields']);

		}

$db->insert_query("userfields", $user['user_fields']);

Zeile 1003Zeile 1011
			die("The user needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

			die("The user needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

		{

		{

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

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





		$user = &$this->data;
$user['uid'] = intval($user['uid']);
$this->uid = $user['uid'];

// Set up the update data.
if(isset($user['username']))

		$user = &$this->data;
$user['uid'] = intval($user['uid']);
$this->uid = $user['uid'];

// Set up the update data.
if(isset($user['username']))

		{

		{

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

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

		}

		}

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

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

Zeile 1023Zeile 1031
			$this->user_update_data['loginkey'] = $user['loginkey'];
}
if(isset($user['email']))

			$this->user_update_data['loginkey'] = $user['loginkey'];
}
if(isset($user['email']))

		{

		{

			$this->user_update_data['email'] = $user['email'];
}
if(isset($user['postnum']))

			$this->user_update_data['email'] = $user['email'];
}
if(isset($user['postnum']))

Zeile 1082Zeile 1090
		if(isset($user['yahoo']))
{
$this->user_update_data['yahoo'] = $db->escape_string(htmlspecialchars($user['yahoo']));

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

		}

		}

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

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

		{

		{

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

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

		}

		}

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

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

		{

		{

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

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

		}

		}

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

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

		{

		{

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

			$this->user_update_data['style'] = intval($user['style']);
}
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['regip']))

		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['language']))

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

Zeile 1131Zeile 1139
			$this->user_update_data['notepad'] = $db->escape_string($user['notepad']);
}
if(is_array($user['options']))

			$this->user_update_data['notepad'] = $db->escape_string($user['notepad']);
}
if(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;

Zeile 1151Zeile 1159
		}

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

		}

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

		

		

		if(count($this->user_update_data) < 1) 
{
return false;

		if(count($this->user_update_data) < 1) 
{
return false;

Zeile 1161Zeile 1169
		$db->update_query("users", $this->user_update_data, "uid='{$user['uid']}'");

$cache->update_moderators();

		$db->update_query("users", $this->user_update_data, "uid='{$user['uid']}'");

$cache->update_moderators();

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


// Maybe some userfields need to be updated?
if(is_array($user['user_fields']))


// Maybe some userfields need to be updated?
if(is_array($user['user_fields']))