Vergleich inc/datahandlers/user.php - 1.4.3 - 1.4.5

  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 4162 2008-08-31 16:44:33Z Tikitiki $

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

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 253Zeile 253
		}

// Check signed up emails

		}

// Check signed up emails

		if($mybb->settings['allowmultipleemails'] == 0)


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

		{
if(email_already_in_use($user['email'], $user['uid']))
{

Zeile 857Zeile 858
		{
$this->verify_checkfields();
}

		{
$this->verify_checkfields();
}


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





		
if(method_exists($plugins, "run_hooks_by_ref"))
{
$plugins->run_hooks_by_ref("datahandler_user_validate", $this);
}


		// 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

		{

		{

			return true;
}
}

			return true;
}
}

Zeile 881Zeile 885

// 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.");
}
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)

Zeile 895Zeile 899
			"username" => $db->escape_string($user['username']),
"password" => $user['saltedpw'],
"salt" => $user['salt'],

			"username" => $db->escape_string($user['username']),
"password" => $user['saltedpw'],
"salt" => $user['salt'],

			"loginkey" => $user['loginkey'],

			"loginkey" => $user['loginkey'],

			"email" => $db->escape_string($user['email']),
"postnum" => intval($user['postnum']),
"avatar" => $db->escape_string($user['avatar']),

			"email" => $db->escape_string($user['email']),
"postnum" => intval($user['postnum']),
"avatar" => $db->escape_string($user['avatar']),

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

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


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





		
if(method_exists($plugins, "run_hooks_by_ref"))
{
$plugins->run_hooks_by_ref("datahandler_user_insert", $this);
}


		$this->uid = $db->insert_query("users", $this->user_insert_data);

		$this->uid = $db->insert_query("users", $this->user_insert_data);





		$user['user_fields']['ufid'] = $this->uid;

$query = $db->simple_select("profilefields", "fid");

		$user['user_fields']['ufid'] = $this->uid;

$query = $db->simple_select("profilefields", "fid");

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


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


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

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


// Update forum stats
update_stats(array('numusers' => '+1'));


// Update forum stats
update_stats(array('numusers' => '+1'));

Zeile 1046Zeile 1053
		if(isset($user['usergroup']))
{
$this->user_update_data['usergroup'] = intval($user['usergroup']);

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

		}

		}

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

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

Zeile 1120Zeile 1127
			$this->user_update_data['timeformat'] = $db->escape_string($user['timeformat']);
}
if(isset($user['regip']))

			$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 1139Zeile 1146
			$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;
}

		}

		}

		if(array_key_exists('coppa_user', $user))
{
$this->user_update_data['coppauser'] = intval($user['coppa_user']);

		if(array_key_exists('coppa_user', $user))
{
$this->user_update_data['coppauser'] = intval($user['coppa_user']);

		}

		}

		// First, grab the old user details for later use.
$old_user = get_user($user['uid']);


		// First, grab the old user details for later use.
$old_user = get_user($user['uid']);


Zeile 1157Zeile 1164
		{
unset($this->user_update_data['pmnotice']);
}

		{
unset($this->user_update_data['pmnotice']);
}


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




		
if(method_exists($plugins, "run_hooks_by_ref"))
{
$plugins->run_hooks_by_ref("datahandler_user_update", $this);
}

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

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

Zeile 1196Zeile 1206
				}
$db->insert_query("userfields", $user_fields);
}

				}
$db->insert_query("userfields", $user_fields);
}

			$db->update_query("userfields", $user['user_fields'], "ufid='{$user['uid']}'");

			$db->update_query("userfields", $user['user_fields'], "ufid='{$user['uid']}'", false);

		}

// Let's make sure the user's name gets changed everywhere in the db if it changed.

		}

// Let's make sure the user's name gets changed everywhere in the db if it changed.