Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: user.php 2280 2006-09-27 12:21:17Z chris $
| * $Id: user.php 2458 2006-11-29 07:27:32Z chris $
|
*/
/**
| */
/**
|
Zeile 111 | Zeile 111 |
---|
$username = &$this->data['username'];
|
$username = &$this->data['username'];
|
$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS count", "username='".$db->escape_string($username)."'");
| $query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS count", "LOWER(username)='".$db->escape_string(strtolower($username))."'");
|
$user_count = $db->fetch_field($query, "count"); if($user_count > 0) {
| $user_count = $db->fetch_field($query, "count"); if($user_count > 0) {
|
Zeile 359 | Zeile 359 |
---|
elseif($birthday['day'] && $birthday['month']) { // If only a day and month are specified, put together a d-m string
|
elseif($birthday['day'] && $birthday['month']) { // If only a day and month are specified, put together a d-m string
|
$user['bday'] = $birthday['day']."-".$birthday['month'];
| $user['bday'] = $birthday['day']."-".$birthday['month']."-";
|
} else {
| } else {
|
Zeile 384 | Zeile 384 |
---|
// Loop through profile fields checking if they exist or not and are filled in. $userfields = array(); $comma = '';
|
// Loop through profile fields checking if they exist or not and are filled in. $userfields = array(); $comma = '';
|
| $editable = ''; if(!$this->data['profile_fields_editable']) { $editable = "editable='yes'"; }
|
// Fetch all profile fields first. $options = array( 'order_by' => 'disporder' );
|
// Fetch all profile fields first. $options = array( 'order_by' => 'disporder' );
|
$query = $db->simple_select(TABLE_PREFIX.'profilefields', 'name, type, fid, required', "editable='yes'", $options);
| $query = $db->simple_select(TABLE_PREFIX.'profilefields', 'name, type, fid, required', $editable, $options);
|
// Then loop through the profile fields. while($profilefield = $db->fetch_array($query))
| // Then loop through the profile fields. while($profilefield = $db->fetch_array($query))
|
Zeile 498 | Zeile 504 |
---|
$this->verify_yesno_option($options, 'showquickreply', 'yes'); $this->verify_yesno_option($options, 'showredirect', 'yes');
|
$this->verify_yesno_option($options, 'showquickreply', 'yes'); $this->verify_yesno_option($options, 'showredirect', 'yes');
|
$options['showcodebuttons'] = intval($options['showcodebuttons']); if($this->method == "insert" || (array_key_exists('showcodebuttons', $options) && $options['showcodebuttons'] != '0')) { $options['showcodebuttons'] = 1; }
| if(isset($options['showcodebuttons'])) { $options['showcodebuttons'] = intval($options['showcodebuttons']); if($options['showcodebuttons'] != 0) { $options['showcodebuttons'] = 1; } } else if($this->method == "insert") { $options['showcodebuttons'] = 1; }
|
if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "threaded")) { $options['threadmode'] = 'linear';
| if($this->method == "insert" || (isset($options['threadmode']) && $options['threadmode'] != "threaded")) { $options['threadmode'] = 'linear';
|
Zeile 617 | Zeile 631 |
---|
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'] == "no" || $user['away']['away'] != 'yes') {
| // If the board does not allow "away mode" or the user is marking as not away, set defaults. if($mybb->settings['allowaway'] == "no" || $user['away']['away'] != 'yes') {
|
Zeile 675 | Zeile 689 |
---|
$old_user = get_user($user['uid']); }
|
$old_user = get_user($user['uid']); }
|
if($this->method == "insert" || array_key_exists('usernane', $user))
| if($this->method == "insert" || array_key_exists('username', $user))
|
{ // If the username is the same - no need to verify if(!$old_user['username'] || $user['username'] != $old_user['username'])
| { // If the username is the same - no need to verify if(!$old_user['username'] || $user['username'] != $old_user['username'])
|
Zeile 769 | Zeile 783 |
---|
function insert_user() { global $db, $cache, $plugins;
|
function insert_user() { global $db, $cache, $plugins;
|
// Yes, validating is required. if(!$this->get_validated()) { die("The user needs to be validated before inserting it into the DB.");
| // 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) {
| } if(count($this->get_errors()) > 0) {
|
Zeile 834 | Zeile 848 |
---|
"returndate" => $user['away']['returndate'], "awayreason" => $db->escape_string($user['away']['awayreason']), "notepad" => $db->escape_string($user['notepad']),
|
"returndate" => $user['away']['returndate'], "awayreason" => $db->escape_string($user['away']['awayreason']), "notepad" => $db->escape_string($user['notepad']),
|
"referrer" => intval($user['referrer_uid'])
| "referrer" => intval($user['referrer_uid']), "buddylist" => '', "ignorelist" => '', "pmfolders" => '', "notepad" => ''
|
); $plugins->run_hooks_by_ref("datahandler_user_insert", $this);
| ); $plugins->run_hooks_by_ref("datahandler_user_insert", $this);
|
Zeile 842 | Zeile 860 |
---|
$db->insert_query(TABLE_PREFIX."users", $this->user_insert_data); $this->uid = $db->insert_id();
|
$db->insert_query(TABLE_PREFIX."users", $this->user_insert_data); $this->uid = $db->insert_id();
|
$user['user_fields']['ufid'] = $this->uid;
| $user['user_fields'] = array( 'ufid' => $this->uid, 'fid1' => '', 'fid2' => '', 'fid3' => '' );
|
$db->insert_query(TABLE_PREFIX."userfields", $user['user_fields']);
// Update forum stats
| $db->insert_query(TABLE_PREFIX."userfields", $user['user_fields']);
// Update forum stats
|
Zeile 864 | Zeile 887 |
---|
function update_user() { global $db, $plugins;
|
function update_user() { global $db, $plugins;
|
|
|
// Yes, validating is required. if(!$this->get_validated())
| // Yes, validating is required. if(!$this->get_validated())
|
Zeile 1006 | Zeile 1030 |
---|
$old_user = get_user($user['uid']);
$plugins->run_hooks_by_ref("datahandler_user_update", $this);
|
$old_user = get_user($user['uid']);
$plugins->run_hooks_by_ref("datahandler_user_update", $this);
|
| if(count($this->user_update_data) < 1) { return false; }
|
// Actual updating happens here. $db->update_query(TABLE_PREFIX."users", $this->user_update_data, "uid='{$user['uid']}'");
| // Actual updating happens here. $db->update_query(TABLE_PREFIX."users", $this->user_update_data, "uid='{$user['uid']}'");
|
Zeile 1017 | Zeile 1046 |
---|
$fields = $db->fetch_array($query); if(!$fields['ufid']) {
|
$fields = $db->fetch_array($query); if(!$fields['ufid']) {
|
$db->insert_query(TABLE_PREFIX."userfields", array('ufid' => $user['uid']));
| $user_fields = array( 'ufid' => $user['uid'], 'fid1' => '', 'fid2' => '', 'fid3' => '' ); $db->insert_query(TABLE_PREFIX."userfields", $user_fields);
|
} $db->update_query(TABLE_PREFIX."userfields", $user['user_fields'], "ufid='{$user['uid']}'"); }
| } $db->update_query(TABLE_PREFIX."userfields", $user['user_fields'], "ufid='{$user['uid']}'"); }
|