Zeile 391 | Zeile 391 |
---|
$captcha->invalidate_captcha(); }
|
$captcha->invalidate_captcha(); }
|
if($mybb->settings['regtype'] != "randompass" && !isset($mybb->cookies['coppauser']))
| if($mybb->settings['regtype'] != "randompass" && empty($mybb->cookies['coppauser']))
|
{ // Log them in my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true, "lax"); }
|
{ // Log them in my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true, "lax"); }
|
if(isset($mybb->cookies['coppauser']))
| if(!empty($mybb->cookies['coppauser']))
|
{ $lang->redirect_registered_coppa_activate = $lang->sprintf($lang->redirect_registered_coppa_activate, $mybb->settings['bbname'], htmlspecialchars_uni($user_info['username'])); my_unsetcookie("coppauser");
| { $lang->redirect_registered_coppa_activate = $lang->sprintf($lang->redirect_registered_coppa_activate, $mybb->settings['bbname'], htmlspecialchars_uni($user_info['username'])); my_unsetcookie("coppauser");
|
Zeile 718 | Zeile 718 |
---|
$birthday_year = ''; }
|
$birthday_year = ''; }
|
| $under_thirteen = false;
|
// Is COPPA checking enabled? if($mybb->settings['coppa'] != "disabled" && !isset($mybb->input['step'])) {
| // Is COPPA checking enabled? if($mybb->settings['coppa'] != "disabled" && !isset($mybb->input['step'])) {
|
Zeile 742 | Zeile 744 |
---|
{ my_setcookie("coppauser", 1, -0); $under_thirteen = true;
|
{ my_setcookie("coppauser", 1, -0); $under_thirteen = true;
|
| } else { my_setcookie("coppauser", 0, -0);
|
} $mybb->request_method = ""; }
| } $mybb->request_method = ""; }
|
Zeile 763 | Zeile 769 |
---|
{ $coppa_agreement = ''; // Is this user a COPPA user? We need to show the COPPA agreement too
|
{ $coppa_agreement = ''; // Is this user a COPPA user? We need to show the COPPA agreement too
|
if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))
| if($mybb->settings['coppa'] != "disabled" && (!empty($mybb->cookies['coppauser']) || $under_thirteen))
|
{ if($mybb->settings['coppa'] == "deny") {
| { if($mybb->settings['coppa'] == "deny") {
|
Zeile 799 | Zeile 805 |
---|
$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);
$stylelist = build_theme_select("style");
|
$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);
$stylelist = build_theme_select("style");
|
|
|
if($mybb->settings['usertppoptions']) { $tppoptions = '';
| if($mybb->settings['usertppoptions']) { $tppoptions = '';
|
Zeile 829 | Zeile 835 |
---|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
} } eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
|
}
| }
|
if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid']) { if(isset($mybb->cookies['mybb']['referrer']))
| if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid']) { if(isset($mybb->cookies['mybb']['referrer']))
|
Zeile 839 | Zeile 845 |
---|
$ref['username'] = htmlspecialchars_uni($ref['username']); $referrername = $ref['username']; }
|
$ref['username'] = htmlspecialchars_uni($ref['username']); $referrername = $ref['username']; }
|
elseif(isset($referrer))
| elseif(!empty($referrer))
|
{ $query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'"); $ref = $db->fetch_array($query);
| { $query = $db->simple_select("users", "username", "uid='".(int)$referrer['uid']."'"); $ref = $db->fetch_array($query);
|
Zeile 849 | Zeile 855 |
---|
elseif(!empty($referrername)) { $ref = get_user_by_username($referrername);
|
elseif(!empty($referrername)) { $ref = get_user_by_username($referrername);
|
if(!$ref['uid'])
| if(!$ref)
|
{ $errors[] = $lang->error_badreferrer; }
| { $errors[] = $lang->error_badreferrer; }
|
Zeile 901 | Zeile 907 |
---|
$code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array(); $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
$code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array(); $profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
|
$thing = explode("\n", $profilefield['type'], "2");
| $thing = explode("\n", $profilefield['type'], 2);
|
$type = trim($thing[0]);
|
$type = trim($thing[0]);
|
$options = $thing[1];
| $options = isset($thing[1]) ? $thing[1] : null;
|
$select = ''; $field = "fid{$profilefield['fid']}"; $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
| $select = ''; $field = "fid{$profilefield['fid']}"; $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
|
Zeile 921 | Zeile 927 |
---|
if(!empty($errors)) { $useropts = $userfield;
|
if(!empty($errors)) { $useropts = $userfield;
|
}
| }
|
else
|
else
|
{
| {
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
{
| {
|
$seloptions[$val] = $val;
|
$seloptions[$val] = $val;
|
}
| }
|
} $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
} $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
{
| {
|
$val = trim($val); $val = str_replace("\n", "\\n", $val);
|
$val = trim($val); $val = str_replace("\n", "\\n", $val);
|
|
|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = ' selected="selected"'; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) {
| { $sel = ' selected="selected"'; }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) {
|
$profilefield['length'] = 3; }
| $profilefield['length'] = 3; }
|
Zeile 958 | Zeile 964 |
---|
} } elseif($type == "select")
|
} } elseif($type == "select")
|
{
| {
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 980 | Zeile 986 |
---|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
|
} } elseif($type == "radio") { $expoptions = explode("\n", $options); if(is_array($expoptions))
| } } elseif($type == "radio") { $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{ foreach($expoptions as $key => $val) {
| { foreach($expoptions as $key => $val) {
|
Zeile 1277 | Zeile 1283 |
---|
{ $query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e' OR type='b')"); $activation = $db->fetch_array($query);
|
{ $query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e' OR type='b')"); $activation = $db->fetch_array($query);
|
if(!$activation['uid'])
| if(!$activation)
|
{ error($lang->error_alreadyactivated); }
| { error($lang->error_alreadyactivated); }
|
Zeile 1456 | Zeile 1462 |
---|
$query = $db->simple_select("awaitingactivation", "*", "uid='".$mybb->user['uid']."' AND type='b'"); $activation = $db->fetch_array($query);
|
$query = $db->simple_select("awaitingactivation", "*", "uid='".$mybb->user['uid']."' AND type='b'"); $activation = $db->fetch_array($query);
|
if($activation['validated'] == 1)
| if($activation && $activation['validated'] == 1)
|
{ error($lang->error_activated_by_admin);
|
{ error($lang->error_activated_by_admin);
|
}
$captcha = ''; // Generate CAPTCHA? if($mybb->settings['captchaimage'])
| }
$captcha = ''; // Generate CAPTCHA? if($mybb->settings['captchaimage'])
|
{ require_once MYBB_ROOT.'inc/class_captcha.php'; $post_captcha = new captcha(true, "post_captcha");
| { require_once MYBB_ROOT.'inc/class_captcha.php'; $post_captcha = new captcha(true, "post_captcha");
|
Zeile 1523 | Zeile 1529 |
---|
if(count($errors) == 0) { while($user = $db->fetch_array($query))
|
if(count($errors) == 0) { while($user = $db->fetch_array($query))
|
{
| {
|
$db->delete_query("awaitingactivation", "uid='{$user['uid']}' AND type='p'"); $user['activationcode'] = random_str(30); $now = TIME_NOW;
| $db->delete_query("awaitingactivation", "uid='{$user['uid']}' AND type='p'"); $user['activationcode'] = random_str(30); $now = TIME_NOW;
|
Zeile 1582 | Zeile 1588 |
---|
if($post_captcha->html) { $captcha = $post_captcha->html;
|
if($post_captcha->html) { $captcha = $post_captcha->html;
|
}
| }
|
}
if(isset($errors) && count($errors) > 0)
| }
if(isset($errors) && count($errors) > 0)
|
Zeile 1642 | Zeile 1648 |
---|
$activationcode = $db->fetch_field($query, 'code'); $now = TIME_NOW; if(!$activationcode || $activationcode !== $mybb->get_input('code'))
|
$activationcode = $db->fetch_field($query, 'code'); $now = TIME_NOW; if(!$activationcode || $activationcode !== $mybb->get_input('code'))
|
{
| {
|
error($lang->error_badlostpwcode); } $db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'");
| error($lang->error_badlostpwcode); } $db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'");
|
Zeile 1650 | Zeile 1656 |
---|
// Generate a new password, then update it $password_length = (int)$mybb->settings['minpasswordlength'];
|
// Generate a new password, then update it $password_length = (int)$mybb->settings['minpasswordlength'];
|
|
|
if($password_length < 8) { $password_length = min(8, (int)$mybb->settings['maxpasswordlength']);
| if($password_length < 8) { $password_length = min(8, (int)$mybb->settings['maxpasswordlength']);
|
Zeile 1660 | Zeile 1666 |
---|
require_once MYBB_ROOT.'inc/datahandlers/user.php'; $userhandler = new UserDataHandler('update');
|
require_once MYBB_ROOT.'inc/datahandlers/user.php'; $userhandler = new UserDataHandler('update');
|
while(!$userhandler->verify_password())
| do
|
{ $password = random_str($password_length, $mybb->settings['requirecomplexpasswords']);
| { $password = random_str($password_length, $mybb->settings['requirecomplexpasswords']);
|
Zeile 1673 | Zeile 1679 |
---|
$userhandler->set_validated(true); $userhandler->errors = array();
|
$userhandler->set_validated(true); $userhandler->errors = array();
|
}
| } while(!$userhandler->verify_password());
|
$userhandler->update_user();
$logindetails = array( 'salt' => $userhandler->data['salt'],
|
$userhandler->update_user();
$logindetails = array( 'salt' => $userhandler->data['salt'],
|
'password' => $userhandler->data['saltedpw'],
| 'password' => $userhandler->data['password'],
|
'loginkey' => $userhandler->data['loginkey'], );
| 'loginkey' => $userhandler->data['loginkey'], );
|
Zeile 1702 | Zeile 1708 |
---|
switch($mybb->settings['username_method']) { case 0:
|
switch($mybb->settings['username_method']) { case 0:
|
$lang_username = $lang->username; break;
| $lang_username = $lang->username; break;
|
case 1: $lang_username = $lang->username1; break; case 2: $lang_username = $lang->username2;
|
case 1: $lang_username = $lang->username1; break; case 2: $lang_username = $lang->username2;
|
break;
| break;
|
default: $lang_username = $lang->username; break; }
$code = htmlspecialchars_uni($mybb->get_input('code'));
|
default: $lang_username = $lang->username; break; }
$code = htmlspecialchars_uni($mybb->get_input('code'));
|
if(!isset($mybb->input['username'])) { $input_username = ''; } $input_username = htmlspecialchars_uni($mybb->input['username']);
| $input_username = htmlspecialchars_uni($mybb->get_input('username'));
|
eval("\$activate = \"".$templates->get("member_resetpassword")."\";"); output_page($activate);
| eval("\$activate = \"".$templates->get("member_resetpassword")."\";"); output_page($activate);
|
Zeile 1789 | Zeile 1791 |
---|
$errors = $loginhandler->get_friendly_errors();
// If we need a captcha set it here
|
$errors = $loginhandler->get_friendly_errors();
// If we need a captcha set it here
|
if($mybb->settings['failedcaptchalogincount'] > 0 && (isset($user['loginattempts']) && $user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))
| if( $mybb->settings['failedcaptchalogincount'] > 0 && ( ( isset($user['loginattempts']) && $user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] ) || ( isset($mybb->cookies['loginattempts']) && (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount'] ) ) )
|
{ $do_captcha = true; $correct = $loginhandler->captcha_verified;
| { $do_captcha = true; $correct = $loginhandler->captcha_verified;
|
Zeile 2183 | Zeile 2197 |
---|
$tpd = $memprofile['threadnum'] / $daysreg; $tpd = round($tpd, 2); if($tpd > $memprofile['threadnum'])
|
$tpd = $memprofile['threadnum'] / $daysreg; $tpd = round($tpd, 2); if($tpd > $memprofile['threadnum'])
|
{
| {
|
$tpd = $memprofile['threadnum']; }
| $tpd = $memprofile['threadnum']; }
|
Zeile 2191 | Zeile 2205 |
---|
if($numthreads == 0) { $thread_percent = "0";
|
if($numthreads == 0) { $thread_percent = "0";
|
}
| }
|
else { $thread_percent = $memprofile['threadnum']*100/$numthreads;
| else { $thread_percent = $memprofile['threadnum']*100/$numthreads;
|
Zeile 2213 | Zeile 2227 |
---|
if(!empty($memprofile['threadnum'])) { eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");
|
if(!empty($memprofile['threadnum'])) { eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");
|
}
| }
|
}
$awaybit = '';
| }
$awaybit = '';
|
Zeile 2333 | Zeile 2347 |
---|
}
// Get the user title for this user
|
}
// Get the user title for this user
|
unset($usertitle);
| |
unset($stars);
|
unset($stars);
|
| $usertitle = '';
|
$starimage = ''; if(trim($memprofile['usertitle']) != '') {
| $starimage = ''; if(trim($memprofile['usertitle']) != '') {
|
Zeile 2348 | Zeile 2362 |
---|
} else {
|
} else {
|
| if(!isset($usertitles)) { $usertitles = $cache->read('usertitles'); }
|
// No usergroup title so get a default one
|
// No usergroup title so get a default one
|
$usertitles = $cache->read('usertitles');
| |
if(is_array($usertitles)) { foreach($usertitles as $title)
| if(is_array($usertitles)) { foreach($usertitles as $title)
|
Zeile 2358 | Zeile 2375 |
---|
if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
$stars = $title['stars']; $starimage = $title['starimage'];
break; } } } }
$usertitle = htmlspecialchars_uni($usertitle);
| $stars = $title['stars']; $starimage = $title['starimage'];
break; } } } }
$usertitle = htmlspecialchars_uni($usertitle);
|
if($memperms['stars'] || $memperms['usertitle']) { // Set the number of stars if display group has constant number of stars $stars = $memperms['stars']; }
|
if($memperms['stars'] || $memperms['usertitle']) { // Set the number of stars if display group has constant number of stars $stars = $memperms['stars']; }
|
elseif(!$stars)
| elseif(!isset($stars))
|
{
|
{
|
if(!is_array($usertitles))
| if(!isset($usertitles))
|
{ $usertitles = $cache->read('usertitles');
|
{ $usertitles = $cache->read('usertitles');
|
}
| }
|
// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups) if(is_array($usertitles))
|
// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups) if(is_array($usertitles))
|
{
| {
|
foreach($usertitles as $title) { if($memprofile['postnum'] >= $title['posts'])
| foreach($usertitles as $title) { if($memprofile['postnum'] >= $title['posts'])
|
Zeile 2393 | Zeile 2410 |
---|
break; } }
|
break; } }
|
| }
if(!isset($stars)) { $stars = 0;
|
} }
| } }
|
Zeile 2425 | Zeile 2447 |
---|
for($i = 0; $i < $stars; ++$i) { eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";");
|
for($i = 0; $i < $stars; ++$i) { eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";");
|
}
| }
|
}
// User is currently online and this user has permissions to view the user on the WOL
| }
// User is currently online and this user has permissions to view the user on the WOL
|
Zeile 2440 | Zeile 2462 |
---|
{ // We have some stamp here if($memprofile['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $memprofile['uid'] != $mybb->user['uid'])
|
{ // We have some stamp here if($memprofile['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $memprofile['uid'] != $mybb->user['uid'])
|
{
| {
|
$memlastvisitdate = $lang->lastvisit_hidden; $online_status = $timeonline = $lang->timeonline_hidden; }
| $memlastvisitdate = $lang->lastvisit_hidden; $online_status = $timeonline = $lang->timeonline_hidden; }
|
Zeile 2455 | Zeile 2477 |
---|
// Online? if(!empty($session))
|
// Online? if(!empty($session))
|
{
| {
|
// Fetch their current location $lang->load("online"); require_once MYBB_ROOT."inc/functions_online.php";
| // Fetch their current location $lang->load("online"); require_once MYBB_ROOT."inc/functions_online.php";
|
Zeile 2514 | Zeile 2536 |
---|
$bg_color = alt_trow();
if($mybb->settings['maxwarningpoints'] < 1)
|
$bg_color = alt_trow();
if($mybb->settings['maxwarningpoints'] < 1)
|
{
| {
|
$mybb->settings['maxwarningpoints'] = 10; }
| $mybb->settings['maxwarningpoints'] = 10; }
|
Zeile 2636 | Zeile 2658 |
---|
{ // Fetch details on their ban $query = $db->simple_select('banned b LEFT JOIN '.TABLE_PREFIX.'users a ON (b.admin=a.uid)', 'b.*, a.username AS adminuser', "b.uid='{$uid}'", array('limit' => 1));
|
{ // Fetch details on their ban $query = $db->simple_select('banned b LEFT JOIN '.TABLE_PREFIX.'users a ON (b.admin=a.uid)', 'b.*, a.username AS adminuser', "b.uid='{$uid}'", array('limit' => 1));
|
$memban = $db->fetch_array($query);
| |
|
|
if($memban['reason'])
| if($db->num_rows($query))
|
{
|
{
|
$memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason'])); } else { $memban['reason'] = $lang->na; }
if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---') { $banlength = $lang->permanent; $timeremaining = $lang->na; $banned_class = "normal_banned"; } else { // Set up the array of ban times. $bantimes = fetch_ban_times();
$banlength = $bantimes[$memban['bantime']]; $remaining = $memban['lifted']-TIME_NOW;
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
$banned_class = ''; if($remaining < 3600) { $banned_class = "high_banned";
| $memban = $db->fetch_array($query);
if($memban['reason']) { $memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason'])); } else { $memban['reason'] = $lang->na;
|
}
|
}
|
else if($remaining < 86400)
| if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---')
|
{
|
{
|
$banned_class = "moderate_banned"; } else if($remaining < 604800) { $banned_class = "low_banned";
| $banlength = $lang->permanent; $timeremaining = $lang->na; $banned_class = "normal_banned";
|
} else {
|
} else {
|
$banned_class = "normal_banned";
| // Set up the array of ban times. $bantimes = fetch_ban_times();
$banlength = $bantimes[$memban['bantime']]; $remaining = $memban['lifted']-TIME_NOW;
$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";
$banned_class = ''; if($remaining < 3600) { $banned_class = "high_banned"; } else if($remaining < 86400) { $banned_class = "moderate_banned"; } else if($remaining < 604800) { $banned_class = "low_banned"; } else { $banned_class = "normal_banned"; }
|
}
|
}
|
} eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');
$memban['adminuser'] = build_profile_link(htmlspecialchars_uni($memban['adminuser']), $memban['admin']);
| eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');
|
|
|
// Display a nice warning to the user eval('$bannedbit = "'.$templates->get('member_profile_banned').'";');
| $memban['adminuser'] = build_profile_link(htmlspecialchars_uni($memban['adminuser']), $memban['admin']);
// Display a nice warning to the user eval('$bannedbit = "'.$templates->get('member_profile_banned').'";'); } else { // TODO: more specific output for converted/merged boards where no ban record is merged. $bannedbit = ''; }
|
}
$adminoptions = '';
| }
$adminoptions = '';
|
Zeile 2879 | Zeile 2910 |
---|
$last_email = $db->fetch_array($query);
// Users last email was within the flood time, show the error
|
$last_email = $db->fetch_array($query);
// Users last email was within the flood time, show the error
|
if($last_email['mid'])
| if(isset($last_email['mid']))
|
{ $remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);
| { $remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);
|
Zeile 3052 | Zeile 3083 |
---|
$last_email = $db->fetch_array($query);
// Users last email was within the flood time, show the error
|
$last_email = $db->fetch_array($query);
// Users last email was within the flood time, show the error
|
if($last_email['mid'])
| if(isset($last_email['mid']))
|
{ $remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);
| { $remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);
|