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 4111 2008-08-13 06:14:12Z 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 528 | Zeile 529 |
---|
$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 585 | Zeile 594 |
---|
}
// 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 679 | Zeile 688 |
---|
if($lastactive <= 0) { $lastactive = TIME_NOW;
|
if($lastactive <= 0) { $lastactive = TIME_NOW;
|
} return true;
}
| } return true;
}
|
/** * Verifies if an away mode status is valid or not. *
| /** * Verifies if an away mode status is valid or not. *
|
Zeile 692 | Zeile 701 |
---|
function verify_away() { global $mybb;
|
function verify_away() { global $mybb;
|
$user = &$this->data;
| $user = &$this->data;
|
// If the board does not allow "away mode" or the user is marking as not away, set defaults. if($mybb->settings['allowaway'] == 0 || $user['away']['away'] != 1) {
| // If the board does not allow "away mode" or the user is marking as not away, set defaults. if($mybb->settings['allowaway'] == 0 || $user['away']['away'] != 1) {
|
Zeile 710 | Zeile 719 |
---|
{ $this->set_error("missing_returndate"); }
|
{ $this->set_error("missing_returndate"); }
|
} }
| } }
|
/** * Verifies if a langage is valid for this user or not. *
| /** * Verifies if a langage is valid for this user or not. *
|
Zeile 722 | Zeile 731 |
---|
{ global $lang;
|
{ global $lang;
|
$language = &$this->data['language'];
| $language = &$this->data['language'];
|
// An invalid language has been specified? if($language != '' && !$lang->language_exists($language)) {
| // An invalid language has been specified? if($language != '' && !$lang->language_exists($language)) {
|
Zeile 760 | Zeile 769 |
---|
{ global $mybb, $plugins;
|
{ global $mybb, $plugins;
|
$user = &$this->data;
| $user = &$this->data;
|
// First, grab the old user details if this user exists if($user['uid']) {
| // First, grab the old user details if this user exists if($user['uid']) {
|
Zeile 849 | 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); if(count($this->get_errors()) > 0)
| // We are done validating, return. $this->set_validated(true); if(count($this->get_errors()) > 0)
|
Zeile 958 | 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);
$user['user_fields']['ufid'] = $this->uid;
| $this->uid = $db->insert_query("users", $this->user_insert_data);
$user['user_fields']['ufid'] = $this->uid;
|
Zeile 975 | 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 1093 | Zeile 1108 |
---|
} 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'])) {
|
Zeile 1149 | 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 1188 | 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.
|