Zeile 211 | Zeile 211 |
---|
$this->set_error("passwords_dont_match"); return false; }
|
$this->set_error("passwords_dont_match"); return false; }
|
// Generate our salt $user['salt'] = generate_salt();
// Combine the password and salt $user['saltedpw'] = create_password_hash($user['password'], $user['salt'], $user);
| |
// Generate the user login key $user['loginkey'] = generate_loginkey();
|
// Generate the user login key $user['loginkey'] = generate_loginkey();
|
return true; }
| // Combine the password and salt $password_fields = create_password($user['password'], false, $user); $user = array_merge($user, $password_fields);
return true; }
|
/** * Verifies usergroup selections and other group details. * * @return boolean True when valid, false when invalid. */ function verify_usergroup()
|
/** * Verifies usergroup selections and other group details. * * @return boolean True when valid, false when invalid. */ function verify_usergroup()
|
{ return true; }
| { return true; }
|
/** * Verifies if an email address is valid or not. *
| /** * Verifies if an email address is valid or not. *
|
Zeile 248 | Zeile 246 |
---|
if(trim_blank_chrs($user['email']) == '') { $this->set_error('missing_email');
|
if(trim_blank_chrs($user['email']) == '') { $this->set_error('missing_email');
|
return false; }
| return false; }
|
// Check if this is a proper email address. if(!validate_email_format($user['email']))
|
// Check if this is a proper email address. if(!validate_email_format($user['email']))
|
{
| {
|
$this->set_error('invalid_email_format');
|
$this->set_error('invalid_email_format');
|
return false; }
| return false; }
|
// Check banned emails if(is_banned_email($user['email'], true)) { $this->set_error('banned_email');
|
// Check banned emails if(is_banned_email($user['email'], true)) { $this->set_error('banned_email');
|
return false; }
| return false; }
|
// Check signed up emails // 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"))
| // Check signed up emails // 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"))
|
Zeile 279 | Zeile 277 |
---|
$this->set_error('email_already_in_use'); return false; }
|
$this->set_error('email_already_in_use'); return false; }
|
}
| }
|
// If we have an "email2", verify it matches the existing email if(isset($user['email2']) && $user['email'] != $user['email2']) {
| // If we have an "email2", verify it matches the existing email if(isset($user['email2']) && $user['email'] != $user['email2']) {
|
Zeile 308 | Zeile 306 |
---|
if(!empty($website) && !my_validate_url($website)) { $this->set_error('invalid_website');
|
if(!empty($website) && !my_validate_url($website)) { $this->set_error('invalid_website');
|
return false; }
return true; }
| return false; }
return true; }
|
/** * Verifies if an ICQ number is valid or not.
| /** * Verifies if an ICQ number is valid or not.
|
Zeile 345 | Zeile 343 |
---|
$birthday = &$user['birthday'];
if(!is_array($birthday))
|
$birthday = &$user['birthday'];
if(!is_array($birthday))
|
{
| {
|
return true; }
|
return true; }
|
|
|
// Sanitize any input we have $birthday['day'] = (int)$birthday['day']; $birthday['month'] = (int)$birthday['month'];
| // Sanitize any input we have $birthday['day'] = (int)$birthday['day']; $birthday['month'] = (int)$birthday['month'];
|
Zeile 358 | Zeile 356 |
---|
if($birthday['day'] != 0 || $birthday['month'] != 0) { if($birthday['day'] < 1 || $birthday['day'] > 31 || $birthday['month'] < 1 || $birthday['month'] > 12 || ($birthday['month'] == 2 && $birthday['day'] > 29))
|
if($birthday['day'] != 0 || $birthday['month'] != 0) { if($birthday['day'] < 1 || $birthday['day'] > 31 || $birthday['month'] < 1 || $birthday['month'] > 12 || ($birthday['month'] == 2 && $birthday['day'] > 29))
|
{ $this->set_error("invalid_birthday"); return false;
| { $this->set_error("invalid_birthday"); return false;
|
}
|
}
|
}
| }
|
// Check if the day actually exists. $months = get_bdays($birthday['year']); if($birthday['month'] != 0 && $birthday['day'] > $months[$birthday['month']-1])
|
// Check if the day actually exists. $months = get_bdays($birthday['year']); if($birthday['month'] != 0 && $birthday['day'] > $months[$birthday['month']-1])
|
{ $this->set_error("invalid_birthday");
| { $this->set_error("invalid_birthday");
|
return false; }
| return false; }
|
Zeile 376 | Zeile 374 |
---|
if($birthday['year'] != 0 && ($birthday['year'] < (date("Y")-100)) || $birthday['year'] > date("Y")) { $this->set_error("invalid_birthday");
|
if($birthday['year'] != 0 && ($birthday['year'] < (date("Y")-100)) || $birthday['year'] > date("Y")) { $this->set_error("invalid_birthday");
|
return false;
| return false;
|
} else if($birthday['year'] == date("Y")) {
| } else if($birthday['year'] == date("Y")) {
|
Zeile 407 | Zeile 405 |
---|
$user['bday'] = $birthday['day']."-".$birthday['month']."-".$birthday['year']; } elseif($birthday['day'] && $birthday['month'])
|
$user['bday'] = $birthday['day']."-".$birthday['month']."-".$birthday['year']; } 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']."-"; }
| // If only a day and month are specified, put together a d-m string $user['bday'] = $birthday['day']."-".$birthday['month']."-"; }
|
Zeile 435 | Zeile 433 |
---|
if(!in_array($birthdayprivacy, $accepted)) { $this->set_error("invalid_birthday_privacy");
|
if(!in_array($birthdayprivacy, $accepted)) { $this->set_error("invalid_birthday_privacy");
|
return false; } return true; }
| return false; } return true; }
|
/** * Verifies if the post count field is filled in correctly.
| /** * Verifies if the post count field is filled in correctly.
|
Zeile 452 | Zeile 450 |
---|
if(isset($user['postnum']) && $user['postnum'] < 0) { $this->set_error("invalid_postnum");
|
if(isset($user['postnum']) && $user['postnum'] < 0) { $this->set_error("invalid_postnum");
|
return false; }
return true; }
| return false; }
return true; }
|
/** * Verifies if the thread count field is filled in correctly.
| /** * Verifies if the thread count field is filled in correctly.
|
Zeile 466 | Zeile 464 |
---|
function verify_threadnum() { $user = &$this->data;
|
function verify_threadnum() { $user = &$this->data;
|
|
|
if(isset($user['threadnum']) && $user['threadnum'] < 0) { $this->set_error("invalid_threadnum");
|
if(isset($user['threadnum']) && $user['threadnum'] < 0) { $this->set_error("invalid_threadnum");
|
return false; }
return true; }
| return false; }
return true; }
|
/** * Verifies if a profile fields are filled in correctly. *
| /** * Verifies if a profile fields are filled in correctly. *
|
Zeile 736 | Zeile 734 |
---|
if($options['ppp'] > $biggest) { $options['ppp'] = $biggest;
|
if($options['ppp'] > $biggest) { $options['ppp'] = $biggest;
|
}
| }
|
} $options['ppp'] = (int)$options['ppp']; }
| } $options['ppp'] = (int)$options['ppp']; }
|
Zeile 997 | Zeile 995 |
---|
$this->verify_threadnum(); } if($this->method == "insert" || array_key_exists('profile_fields', $user))
|
$this->verify_threadnum(); } if($this->method == "insert" || array_key_exists('profile_fields', $user))
|
{
| {
|
$this->verify_profile_fields(); } if($this->method == "insert" || array_key_exists('referrer', $user))
| $this->verify_profile_fields(); } if($this->method == "insert" || array_key_exists('referrer', $user))
|
Zeile 1058 | Zeile 1056 |
---|
return false; } else
|
return false; } else
|
{
| {
|
return true; } }
| return true; } }
|
Zeile 1080 | Zeile 1078 |
---|
if(count($this->get_errors()) > 0) { die("The user is not valid.");
|
if(count($this->get_errors()) > 0) { die("The user is not valid.");
|
}
$user = &$this->data;
| }
$user = &$this->data;
|
$array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'aim', 'yahoo', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad'); foreach($array as $value)
| $array = array('postnum', 'threadnum', 'avatar', 'avatartype', 'additionalgroups', 'displaygroup', 'icq', 'aim', 'yahoo', 'skype', 'google', 'bday', 'signature', 'style', 'dateformat', 'timeformat', 'notepad'); foreach($array as $value)
|
Zeile 1095 | Zeile 1093 |
---|
$this->user_insert_data = array( "username" => $db->escape_string($user['username']),
|
$this->user_insert_data = array( "username" => $db->escape_string($user['username']),
|
"password" => $user['saltedpw'],
| "password" => $user['password'],
|
"salt" => $user['salt'], "loginkey" => $user['loginkey'], "email" => $db->escape_string($user['email']),
| "salt" => $user['salt'], "loginkey" => $user['loginkey'], "email" => $db->escape_string($user['email']),
|
Zeile 1258 | Zeile 1256 |
---|
{ $this->user_update_data['username'] = $db->escape_string($user['username']); }
|
{ $this->user_update_data['username'] = $db->escape_string($user['username']); }
|
if(isset($user['saltedpw']))
| if(isset($user['password'])) { $this->user_update_data['password'] = $user['password']; } if(isset($user['salt']))
|
{
|
{
|
$this->user_update_data['password'] = $user['saltedpw'];
| |
$this->user_update_data['salt'] = $user['salt'];
|
$this->user_update_data['salt'] = $user['salt'];
|
| } if(isset($user['loginkey'])) {
|
$this->user_update_data['loginkey'] = $user['loginkey']; } if(isset($user['email']))
| $this->user_update_data['loginkey'] = $user['loginkey']; } if(isset($user['email']))
|
Zeile 1583 | Zeile 1587 |
---|
$cache->update_forumsdisplay(); $cache->update_reportedcontent(); $cache->update_awaitingactivation();
|
$cache->update_forumsdisplay(); $cache->update_reportedcontent(); $cache->update_awaitingactivation();
|
| $cache->update_birthdays();
|
return $this->return_values; }
| return $this->return_values; }
|