Zeile 6 | Zeile 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 253 | Zeile 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 857 | Zeile 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 881 | Zeile 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 895 | Zeile 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 966 | Zeile 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 983 | Zeile 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 1082 | Zeile 1089 |
---|
if(isset($user['icq'])) { $this->user_update_data['icq'] = intval($user['icq']);
|
if(isset($user['icq'])) { $this->user_update_data['icq'] = intval($user['icq']);
|
}
| }
|
if(isset($user['aim'])) { $this->user_update_data['aim'] = $db->escape_string(htmlspecialchars($user['aim']));
| if(isset($user['aim'])) { $this->user_update_data['aim'] = $db->escape_string(htmlspecialchars($user['aim']));
|
Zeile 1092 | Zeile 1099 |
---|
$this->user_update_data['yahoo'] = $db->escape_string(htmlspecialchars($user['yahoo'])); } if(isset($user['msn']))
|
$this->user_update_data['yahoo'] = $db->escape_string(htmlspecialchars($user['yahoo'])); } if(isset($user['msn']))
|
{
| {
|
$this->user_update_data['msn'] = $db->escape_string(htmlspecialchars($user['msn'])); } if(isset($user['bday']))
|
$this->user_update_data['msn'] = $db->escape_string(htmlspecialchars($user['msn'])); } if(isset($user['bday']))
|
{
| {
|
$this->user_update_data['birthday'] = $user['bday'];
|
$this->user_update_data['birthday'] = $user['bday'];
|
}
| }
|
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'])) { $this->user_update_data['style'] = intval($user['style']);
| if(isset($user['style'])) { $this->user_update_data['style'] = intval($user['style']);
|
Zeile 1120 | Zeile 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 1139 | Zeile 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 1157 | Zeile 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 1196 | Zeile 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.
|