Zeile 247 | Zeile 247 |
---|
else { $user_info = $userhandler->insert_user();
|
else { $user_info = $userhandler->insert_user();
|
| // Invalidate solved captcha if($mybb->settings['captchaimage']) { $captcha->invalidate_captcha(); }
|
if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser']) {
| if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser']) {
|
Zeile 281 | Zeile 287 |
---|
break; case 1: $emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
break; case 1: $emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
break;
| break;
|
case 2: $emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
case 2: $emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
break;
| break;
|
default: $emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode); break;
| default: $emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode); break;
|
Zeile 292 | Zeile 298 |
---|
my_mail($user_info['email'], $emailsubject, $emailmessage); $lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);
|
my_mail($user_info['email'], $emailsubject, $emailmessage); $lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);
|
|
|
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_activation); } else if($mybb->settings['regtype'] == "randompass")
|
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_activation); } else if($mybb->settings['regtype'] == "randompass")
|
{
| {
|
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']); switch($mybb->settings['username_method']) { case 0:
|
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']); switch($mybb->settings['username_method']) { case 0:
|
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break;
| $emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break;
|
case 1: $emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break; case 2: $emailmessage = $lang->sprintf($lang->email_randompassword2, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
|
case 1: $emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break; case 2: $emailmessage = $lang->sprintf($lang->email_randompassword2, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
|
break;
| break;
|
default: $emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break;
|
default: $emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']); break;
|
}
| }
|
my_mail($user_info['email'], $emailsubject, $emailmessage);
$plugins->run_hooks("member_do_register_end");
| my_mail($user_info['email'], $emailsubject, $emailmessage);
$plugins->run_hooks("member_do_register_end");
|
Zeile 365 | Zeile 371 |
---|
$bdaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else
|
$bdaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else
|
{
| {
|
$bdaysel .= "<option value=\"$i\">$i</option>\n"; } }
|
$bdaysel .= "<option value=\"$i\">$i</option>\n"; } }
|
|
|
$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\""; $mybb->input['bday3'] = intval($mybb->input['bday3']);
| $bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\""; $mybb->input['bday3'] = intval($mybb->input['bday3']);
|
Zeile 382 | Zeile 388 |
---|
if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3']) { my_unsetcookie("coppauser");
|
if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3']) { my_unsetcookie("coppauser");
|
| $mybb->input['bday1'] = intval($mybb->input['bday1']); $mybb->input['bday2'] = intval($mybb->input['bday2']); $mybb->input['bday3'] = intval($mybb->input['bday3']); $months = get_bdays($mybb->input['bday3']); if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $mybb->input['bday3'] < (date("Y")-100) || $mybb->input['bday3'] > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1]) { error($lang->error_invalid_birthday); }
|
$bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $mybb->input['bday3']);
| $bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $mybb->input['bday3']);
|
Zeile 533 | Zeile 548 |
---|
$userfield = ''; } if($type == "multiselect")
|
$userfield = ''; } if($type == "multiselect")
|
{ if($errors) {
| { if($errors) {
|
$useropts = $userfield; } else
| $useropts = $userfield; } else
|
Zeile 823 | Zeile 838 |
---|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
if(!$activation['uid']) { error($lang->error_alreadyactivated);
|
}
| }
|
if($activation['code'] != $mybb->input['code']) { error($lang->error_badactivationcode);
| if($activation['code'] != $mybb->input['code']) { error($lang->error_badactivationcode);
|
Zeile 1154 | Zeile 1169 |
---|
$errors = array();
|
$errors = array();
|
| $login_captcha = false;
|
if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount'])) { // Show captcha image if enabled
| if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount'])) { // Show captcha image if enabled
|
Zeile 1231 | Zeile 1247 |
---|
{ error($lang->error_awaitingcoppa); }
|
{ error($lang->error_awaitingcoppa); }
|
| // Invalidate captcha if($login_captcha !== false) { $login_captcha->invalidate_captcha(); }
|
my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array(
| my_setcookie('loginattempts', 1); $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array(
|
Zeile 1255 | Zeile 1277 |
---|
$plugins->run_hooks("member_do_login_end");
if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
|
$plugins->run_hooks("member_do_login_end");
if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
|
{
| {
|
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false) { $mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
| if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false) { $mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
|
Zeile 1309 | Zeile 1331 |
---|
$correct = false; require_once MYBB_ROOT.'inc/class_captcha.php'; $login_captcha = new captcha(false, "post_captcha");
|
$correct = false; require_once MYBB_ROOT.'inc/class_captcha.php'; $login_captcha = new captcha(false, "post_captcha");
|
|
|
if($do_captcha == false && $login_captcha->type == 1) { if($login_captcha->validate_captcha() == true)
| if($do_captcha == false && $login_captcha->type == 1) { if($login_captcha->validate_captcha() == true)
|
Zeile 1344 | Zeile 1366 |
---|
$captcha = $login_captcha->html; } }
|
$captcha = $login_captcha->html; } }
|
}
| }
|
$username = ""; $password = ""; if($mybb->input['username'] && $mybb->request_method == "post")
| $username = ""; $password = ""; if($mybb->input['username'] && $mybb->request_method == "post")
|
Zeile 1380 | Zeile 1402 |
---|
if(!$mybb->user['uid']) { redirect("index.php", $lang->redirect_alreadyloggedout);
|
if(!$mybb->user['uid']) { redirect("index.php", $lang->redirect_alreadyloggedout);
|
}
| }
|
// Check session ID if we have one if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)
|
// Check session ID if we have one if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)
|
{ error($lang->error_notloggedout); }
| { error($lang->error_notloggedout); }
|
// Otherwise, check logoutkey else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey']) {
| // Otherwise, check logoutkey else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey']) {
|
Zeile 1398 | Zeile 1420 |
---|
if($mybb->user['uid']) { $time = TIME_NOW;
|
if($mybb->user['uid']) { $time = TIME_NOW;
|
$lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'");
| // Run this after the shutdown query from session system $db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastvisit='{$time}', lastactive='{$time}' WHERE uid='{$mybb->user['uid']}'");
|
$db->delete_query("sessions", "sid='".$session->sid."'"); } $plugins->run_hooks("member_logout_end");
| $db->delete_query("sessions", "sid='".$session->sid."'"); } $plugins->run_hooks("member_logout_end");
|
Zeile 1645 | Zeile 1664 |
---|
// If our away time has expired already, we should be back, right? if($returnmkdate < TIME_NOW) {
|
// If our away time has expired already, we should be back, right? if($returnmkdate < TIME_NOW) {
|
$db->update_query('users', array('away' => '0', 'awaydate' => '', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');
| $db->update_query('users', array('away' => '0', 'awaydate' => '0', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');
|
// Update our status to "not away" $memprofile['away'] = 0;
| // Update our status to "not away" $memprofile['away'] = 0;
|
Zeile 1885 | Zeile 1904 |
---|
}
// Fetch the reputation for this user
|
}
// Fetch the reputation for this user
|
if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
| if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
|
{ $bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
// If this user has permission to give reputations show the vote link $vote_link = '';
|
{ $bg_color = alt_trow(); $reputation = get_reputation($memprofile['reputation']);
// If this user has permission to give reputations show the vote link $vote_link = '';
|
if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'])
| if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'] && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))
|
{ $vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]"; }
| { $vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]"; }
|