Zeile 15 | Zeile 15 |
---|
$nosession['avatar'] = 1; $templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";
|
$nosession['avatar'] = 1; $templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";
|
$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_ayah,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_ayah,member_profile_addremove,member_emailuser_guest";
| $templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_nocaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha,member_profile_addremove,member_emailuser_guest";
|
$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes"; $templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option"; $templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted"; $templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option"; $templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";
|
$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes"; $templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option"; $templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted"; $templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option"; $templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";
|
$templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_emailuser_hidden,member_profile_banned";
| $templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_profile_banned,member_profile_findposts,member_profile_findthreads";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 96 | Zeile 96 |
---|
if(isset($mybb->input['regtime'])) { // Check how long it took for this person to register
|
if(isset($mybb->input['regtime'])) { // Check how long it took for this person to register
|
$timetook = TIME_NOW - $mybb->get_input('regtime', 1);
| $timetook = TIME_NOW - $mybb->get_input('regtime', MyBB::INPUT_INT);
|
// See if they registered faster than normal if($timetook < $mybb->settings['regtime'])
| // See if they registered faster than normal if($timetook < $mybb->settings['regtime'])
|
Zeile 125 | Zeile 125 |
---|
if($mybb->settings['regtype'] == "randompass") {
|
if($mybb->settings['regtype'] == "randompass") {
|
$mybb->input['password'] = random_str();
| $password_length = (int)$mybb->settings['minpasswordlength']; if($password_length < 8) { $password_length = min(8, (int)$mybb->settings['maxpasswordlength']); }
$mybb->input['password'] = random_str($password_length, $mybb->settings['requirecomplexpasswords']);
|
$mybb->input['password2'] = $mybb->input['password']; }
|
$mybb->input['password2'] = $mybb->input['password']; }
|
if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', 1) == 1)
| if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', MyBB::INPUT_INT) == 1)
|
{ $usergroup = 5; } else { $usergroup = 2;
|
{ $usergroup = 5; } else { $usergroup = 2;
|
}
| }
|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler("insert");
|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler("insert");
|
|
|
$coppauser = 0; if(isset($mybb->cookies['coppauser'])) {
| $coppauser = 0; if(isset($mybb->cookies['coppauser'])) {
|
Zeile 159 | Zeile 166 |
---|
"referrer" => $mybb->get_input('referrername'), "timezone" => $mybb->get_input('timezoneoffset'), "language" => $mybb->get_input('language'),
|
"referrer" => $mybb->get_input('referrername'), "timezone" => $mybb->get_input('timezoneoffset'), "language" => $mybb->get_input('language'),
|
"profile_fields" => $mybb->get_input('profile_fields', 2),
| "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY),
|
"regip" => $session->packedip, "coppa_user" => $coppauser, "regcheck1" => $mybb->get_input('regcheck1'), "regcheck2" => $mybb->get_input('regcheck2'), "registration" => true
|
"regip" => $session->packedip, "coppa_user" => $coppauser, "regcheck1" => $mybb->get_input('regcheck1'), "regcheck2" => $mybb->get_input('regcheck2'), "registration" => true
|
);
| );
|
// Do we have a saved COPPA DOB? if(isset($mybb->cookies['coppadob']))
| // Do we have a saved COPPA DOB? if(isset($mybb->cookies['coppadob']))
|
Zeile 179 | Zeile 186 |
---|
}
$user['options'] = array(
|
}
$user['options'] = array(
|
"allownotices" => $mybb->get_input('allownotices', 1), "hideemail" => $mybb->get_input('hideemail', 1), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', 1), "receivepms" => $mybb->get_input('receivepms', 1), "pmnotice" => $mybb->get_input('pmnotice', 1), "pmnotify" => $mybb->get_input('pmnotify', 1), "invisible" => $mybb->get_input('invisible', 1),
| "allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT), "hideemail" => $mybb->get_input('hideemail', MyBB::INPUT_INT), "subscriptionmethod" => $mybb->get_input('subscriptionmethod', MyBB::INPUT_INT), "receivepms" => $mybb->get_input('receivepms', MyBB::INPUT_INT), "pmnotice" => $mybb->get_input('pmnotice', MyBB::INPUT_INT), "pmnotify" => $mybb->get_input('pmnotify', MyBB::INPUT_INT), "invisible" => $mybb->get_input('invisible', MyBB::INPUT_INT),
|
"dstcorrection" => $mybb->get_input('dstcorrection') );
| "dstcorrection" => $mybb->get_input('dstcorrection') );
|
Zeile 214 | Zeile 221 |
---|
try { if($stop_forum_spam_checker->is_user_a_spammer($user['username'], $user['email'], get_ip())) {
|
try { if($stop_forum_spam_checker->is_user_a_spammer($user['username'], $user['email'], get_ip())) {
|
error($lang->error_stop_forum_spam_spammer);
| error($lang->sprintf($lang->error_stop_forum_spam_spammer, $stop_forum_spam_checker->getErrorText(array( 'stopforumspam_check_usernames', 'stopforumspam_check_emails', 'stopforumspam_check_ips' ))));
|
} } catch (Exception $e)
| } } catch (Exception $e)
|
Zeile 285 | Zeile 297 |
---|
}
$db->delete_query("questionsessions", "sid='{$sid}'");
|
}
$db->delete_query("questionsessions", "sid='{$sid}'");
|
}
| }
|
}
if(is_array($errors))
| }
if(is_array($errors))
|
Zeile 298 | Zeile 310 |
---|
$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = ''; $receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';
|
$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = ''; $receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';
|
if($mybb->get_input('allownotices', 1) == 1)
| if($mybb->get_input('allownotices', MyBB::INPUT_INT) == 1)
|
{ $allownoticescheck = "checked=\"checked\""; }
|
{ $allownoticescheck = "checked=\"checked\""; }
|
if($mybb->get_input('hideemail', 1) == 1)
| if($mybb->get_input('hideemail', MyBB::INPUT_INT) == 1)
|
{ $hideemailcheck = "checked=\"checked\"";
|
{ $hideemailcheck = "checked=\"checked\"";
|
}
| }
|
|
|
if($mybb->get_input('subscriptionmethod', 1) == 1) {
| if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 1) {
|
$no_subscribe_selected = "selected=\"selected\"";
|
$no_subscribe_selected = "selected=\"selected\"";
|
} else if($mybb->get_input('subscriptionmethod', 1) == 2) {
| } else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 2) {
|
$instant_email_subscribe_selected = "selected=\"selected\""; }
|
$instant_email_subscribe_selected = "selected=\"selected\""; }
|
else if($mybb->get_input('subscriptionmethod', 1) == 3)
| else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 3)
|
{ $instant_pm_subscribe_selected = "selected=\"selected\""; }
| { $instant_pm_subscribe_selected = "selected=\"selected\""; }
|
Zeile 325 | Zeile 337 |
---|
$no_auto_subscribe_selected = "selected=\"selected\""; }
|
$no_auto_subscribe_selected = "selected=\"selected\""; }
|
if($mybb->get_input('receivepms', 1) == 1)
| if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)
|
{ $receivepmscheck = "checked=\"checked\"";
|
{ $receivepmscheck = "checked=\"checked\"";
|
}
| }
|
|
|
if($mybb->get_input('pmnotice', 1) == 1)
| if($mybb->get_input('pmnotice', MyBB::INPUT_INT) == 1)
|
{ $pmnoticecheck = " checked=\"checked\"";
|
{ $pmnoticecheck = " checked=\"checked\"";
|
}
if($mybb->get_input('pmnotify', 1) == 1)
| }
if($mybb->get_input('pmnotify', MyBB::INPUT_INT) == 1)
|
{ $pmnotifycheck = "checked=\"checked\"";
|
{ $pmnotifycheck = "checked=\"checked\"";
|
}
if($mybb->get_input('invisible', 1) == 1)
| }
if($mybb->get_input('invisible', MyBB::INPUT_INT) == 1)
|
{ $invisiblecheck = "checked=\"checked\"";
|
{ $invisiblecheck = "checked=\"checked\"";
|
}
if($mybb->get_input('dstcorrection', 1) == 2)
| }
if($mybb->get_input('dstcorrection', MyBB::INPUT_INT) == 2)
|
{ $dst_auto_selected = "selected=\"selected\""; }
|
{ $dst_auto_selected = "selected=\"selected\""; }
|
else if($mybb->get_input('dstcorrection', 1) == 1)
| else if($mybb->get_input('dstcorrection', MyBB::INPUT_INT) == 1)
|
{ $dst_enabled_selected = "selected=\"selected\""; } else { $dst_disabled_selected = "selected=\"selected\"";
|
{ $dst_enabled_selected = "selected=\"selected\""; } else { $dst_disabled_selected = "selected=\"selected\"";
|
}
| }
|
$regerrors = inline_error($errors); $mybb->input['action'] = "register";
| $regerrors = inline_error($errors); $mybb->input['action'] = "register";
|
Zeile 365 | Zeile 377 |
---|
else { $user_info = $userhandler->insert_user();
|
else { $user_info = $userhandler->insert_user();
|
|
|
// Invalidate solved captcha if($mybb->settings['captchaimage']) { $captcha->invalidate_captcha();
|
// Invalidate solved captcha if($mybb->settings['captchaimage']) { $captcha->invalidate_captcha();
|
}
| }
|
if($mybb->settings['regtype'] != "randompass" && !isset($mybb->cookies['coppauser'])) { // Log them in my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);
|
if($mybb->settings['regtype'] != "randompass" && !isset($mybb->cookies['coppauser'])) { // Log them in my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);
|
}
| }
|
if(isset($mybb->cookies['coppauser'])) {
| if(isset($mybb->cookies['coppauser'])) {
|
Zeile 408 | Zeile 420 |
---|
break; case 2: $emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
break; 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);
|
default: $emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
|
break; } 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");
| break; } 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")
|
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']);
| $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 1: $emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
|
Zeile 443 | Zeile 455 |
---|
$plugins->run_hooks("member_do_register_end");
|
$plugins->run_hooks("member_do_register_end");
|
error($lang->redirect_registered_passwordsent);
| error($lang->redirect_registered_passwordsent); } else if($mybb->settings['regtype'] == "admin") { $groups = $cache->read("usergroups"); $admingroups = array(); if(!empty($groups)) // Shouldn't be... { foreach($groups as $group) { if($group['cancp'] == 1) { $admingroups[] = (int)$group['gid']; } } }
if(!empty($admingroups)) { $sqlwhere = 'usergroup IN ('.implode(',', $admingroups).')'; foreach($admingroups as $admingroup) { switch($db->type) { case 'pgsql': case 'sqlite': $sqlwhere .= " OR ','||additionalgroups||',' LIKE '%,{$admingroup},%'"; break; default: $sqlwhere .= " OR CONCAT(',',additionalgroups,',') LIKE '%,{$admingroup},%'"; break; } } $q = $db->simple_select('users', 'uid,username,email,language', $sqlwhere); while($recipient = $db->fetch_array($q)) { // First we check if the user's a super admin: if yes, we don't care about permissions $is_super_admin = is_super_admin($recipient['uid']); if(!$is_super_admin) { // Include admin functions if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php")) { continue; }
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
// Verify if we have permissions to access user-users require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php"; if(function_exists("user_admin_permissions")) { // Get admin permissions $adminperms = get_admin_permissions($recipient['uid']);
$permissions = user_admin_permissions(); if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1) { continue; // No permissions } } }
// Load language if($recipient['language'] != $mybb->user['language'] && $lang->language_exists($recipient['language'])) { $reset_lang = true; $lang->set_language($recipient['language']); $lang->load("member"); }
$subject = $lang->sprintf($lang->newregistration_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->newregistration_message, $recipient['username'], $mybb->settings['bbname'], $user['username']); my_mail($recipient['email'], $subject, $message); }
// Reset language if(isset($reset_lang)) { $lang->set_language($mybb->user['language']); $lang->load("member"); } }
$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_admin_activate);
|
}
|
}
|
else if($mybb->settings['regtype'] == "admin") { $groups = $cache->read("usergroups"); $admingroups = array(); if(!empty($groups)) // Shouldn't be... { foreach($groups as $group) { if($group['cancp'] == 1) { $admingroups[] = (int)$group['gid']; } } }
if(!empty($admingroups)) { $sqlwhere = 'usergroup IN ('.implode(',', $admingroups).')'; foreach($admingroups as $admingroup) { switch($db->type) { case 'pgsql': case 'sqlite': $sqlwhere .= " OR ','||additionalgroups||',' LIKE '%,{$admingroup},%'"; break; default: $sqlwhere .= " OR CONCAT(',',additionalgroups,',') LIKE '%,{$admingroup},%'"; break; } } $q = $db->simple_select('users', 'uid,username,email,language', $sqlwhere); while($recipient = $db->fetch_array($q)) { // First we check if the user's a super admin: if yes, we don't care about permissions $is_super_admin = is_super_admin($recipient['uid']); if(!$is_super_admin) { // Include admin functions if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php")) { continue; }
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
// Verify if we have permissions to access user-users require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php"; if(function_exists("user_admin_permissions")) { // Get admin permissions $adminperms = get_admin_permissions($recipient['uid']);
$permissions = user_admin_permissions(); if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1) { continue; // No permissions } } }
// Load language if($recipient['language'] != $mybb->user['language'] && $lang->language_exists($recipient['language'])) { $reset_lang = true; $lang->set_language($recipient['language']); $lang->load("member"); }
$subject = $lang->sprintf($lang->newregistration_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->newregistration_message, $recipient['username'], $mybb->settings['bbname'], $user['username']); my_mail($recipient['email'], $subject, $message); }
// Reset language if(isset($reset_lang)) { $lang->set_language($mybb->user['language']); $lang->load("member"); } }
$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_admin_activate); } else if($mybb->settings['regtype'] == "both")
| else if($mybb->settings['regtype'] == "both")
|
{ $groups = $cache->read("usergroups"); $admingroups = array();
| { $groups = $cache->read("usergroups"); $admingroups = array();
|
Zeile 678 | Zeile 690 |
---|
{ $bdaysel = $bday2blank = ''; }
|
{ $bdaysel = $bday2blank = ''; }
|
$mybb->input['bday1'] = $mybb->get_input('bday1', 1);
| $mybb->input['bday1'] = $mybb->get_input('bday1', MyBB::INPUT_INT);
|
for($day = 1; $day <= 31; ++$day) { $selected = '';
| for($day = 1; $day <= 31; ++$day) { $selected = '';
|
Zeile 690 | Zeile 702 |
---|
eval("\$bdaysel .= \"".$templates->get("member_register_day")."\";"); }
|
eval("\$bdaysel .= \"".$templates->get("member_register_day")."\";"); }
|
$mybb->input['bday2'] = $mybb->get_input('bday2', 1);
| $mybb->input['bday2'] = $mybb->get_input('bday2', MyBB::INPUT_INT);
|
$bdaymonthsel = array(); foreach(range(1, 12) as $number) { $bdaymonthsel[$number] = ''; } $bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
|
$bdaymonthsel = array(); foreach(range(1, 12) as $number) { $bdaymonthsel[$number] = ''; } $bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
|
$mybb->input['bday3'] = $mybb->get_input('bday3', 1);
| $mybb->input['bday3'] = $mybb->get_input('bday3', MyBB::INPUT_INT);
|
if($mybb->input['bday3'] == 0) {
| if($mybb->input['bday3'] == 0) {
|
Zeile 753 | Zeile 765 |
---|
if($mybb->settings['coppa'] == "deny") { error($lang->error_need_to_be_thirteen);
|
if($mybb->settings['coppa'] == "deny") { error($lang->error_need_to_be_thirteen);
|
}
| }
|
$lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']); eval("\$coppa_agreement = \"".$templates->get("member_register_agreement_coppa")."\";"); }
| $lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']); eval("\$coppa_agreement = \"".$templates->get("member_register_agreement_coppa")."\";"); }
|
Zeile 807 | Zeile 819 |
---|
$val = trim($val); $ppp_option = $lang->sprintf($lang->ppp_option, $val); eval("\$pppoptions .= \"".$templates->get("usercp_options_pppselect_option")."\";");
|
$val = trim($val); $ppp_option = $lang->sprintf($lang->ppp_option, $val); eval("\$pppoptions .= \"".$templates->get("usercp_options_pppselect_option")."\";");
|
} }
| } }
|
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";"); } if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
| eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";"); } if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
|
Zeile 832 | Zeile 844 |
---|
{ $errors[] = $lang->error_badreferrer; }
|
{ $errors[] = $lang->error_badreferrer; }
|
}
| }
|
else
|
else
|
{
| {
|
$referrername = '';
|
$referrername = '';
|
} if(isset($quickreg)) {
| } if(isset($quickreg)) {
|
$refbg = "trow1"; } else
| $refbg = "trow1"; } else
|
Zeile 851 | Zeile 863 |
---|
{ $referrer = ''; }
|
{ $referrer = ''; }
|
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', 2);
| $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
// Custom profile fields baby! $altbg = "trow1"; $requiredfields = $customfields = '';
|
if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', 1) == 1) {
| if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', MyBB::INPUT_INT) == 1) {
|
$usergroup = 5; } else
| $usergroup = 5; } else
|
Zeile 871 | Zeile 883 |
---|
{ foreach($pfcache as $profilefield) {
|
{ foreach($pfcache as $profilefield) {
|
if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || $profilefield['editableby'] == '' || $profilefield['editableby'] && $profilefield['editableby'] != -1 && !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))
| if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))
|
{ continue; }
|
{ continue; }
|
| $code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';
|
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $thing = explode("\n", $profilefield['type'], "2"); $type = trim($thing[0]); $options = $thing[1]; $select = ''; $field = "fid{$profilefield['fid']}";
|
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $thing = explode("\n", $profilefield['type'], "2"); $type = trim($thing[0]); $options = $thing[1]; $select = ''; $field = "fid{$profilefield['fid']}";
|
| $profilefield['description'] = htmlspecialchars_uni($profilefield['description']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
|
if($errors && isset($mybb->input['profile_fields'][$field])) { $userfield = $mybb->input['profile_fields'][$field];
|
if($errors && isset($mybb->input['profile_fields'][$field])) { $userfield = $mybb->input['profile_fields'][$field];
|
}
| }
|
else { $userfield = '';
| else { $userfield = '';
|
Zeile 895 | Zeile 910 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else { $useropts = explode("\n", $userfield);
| else { $useropts = explode("\n", $userfield);
|
Zeile 905 | Zeile 920 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $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);
$sel = "";
|
$val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = "";
|
if($val == $seloptions[$val])
| if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{
|
{
|
$sel = " selected=\"selected\"";
| $sel = ' selected="selected"';
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
| }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
Zeile 929 | Zeile 944 |
---|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
|
} }
| } }
|
elseif($type == "select") { $expoptions = explode("\n", $options);
| elseif($type == "select") { $expoptions = explode("\n", $options);
|
Zeile 943 | Zeile 958 |
---|
$sel = ""; if($val == $userfield) {
|
$sel = ""; if($val == $userfield) {
|
$sel = " selected=\"selected\"";
| $sel = ' selected="selected"';
|
}
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
| }
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
|
Zeile 966 | Zeile 981 |
---|
$checked = ""; if($val == $userfield) {
|
$checked = ""; if($val == $userfield) {
|
$checked = "checked=\"checked\"";
| $checked = 'checked="checked"';
|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");
| }
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");
|
Zeile 996 | Zeile 1011 |
---|
foreach($expoptions as $key => $val) { $checked = "";
|
foreach($expoptions as $key => $val) { $checked = "";
|
if($val == $seloptions[$val])
| if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{
|
{
|
$checked = "checked=\"checked\"";
| $checked = 'checked="checked"';
|
}
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
| }
eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
|
Zeile 1020 | Zeile 1035 |
---|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
|
}
| }
|
if($profilefield['required'] == 1) {
|
if($profilefield['required'] == 1) {
|
// JS validator extra if($type == "checkbox" || $type == "radio")
| // JS validator extra, choose correct selectors for everything except single select which always has value if($type != 'select')
|
{
|
{
|
$id = "{$field}0"; } else { $id = "fid{$profilefield['fid']}"; } $validator_extra .= " $(\"#{$id}\").rules(\"add\", { required: true, minlength: 1, messages: { required: \"{$lang->js_validator_not_empty}\"
| if($type == "textarea") { $inp_selector = "$('textarea[name=\"profile_fields[{$field}]\"]')"; } elseif($type == "multiselect") { $inp_selector = "$('select[name=\"profile_fields[{$field}][]\"]')"; } elseif($type == "checkbox") { $inp_selector = "$('input[name=\"profile_fields[{$field}][]\"]')"; } else { $inp_selector = "$('input[name=\"profile_fields[{$field}]\"]')";
|
}
|
}
|
});\n";
| $validator_extra .= " {$inp_selector}.rules('add', { required: true, messages: { required: '{$lang->js_validator_not_empty}' } });\n"; }
|
eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";"); }
| eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";"); }
|
Zeile 1049 | Zeile 1074 |
---|
{ eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";"); }
|
{ eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";"); }
|
$code = ''; $select = ''; $val = ''; $options = ''; $expoptions = ''; $useropts = ''; $seloptions = '';
| } if($requiredfields) { eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";"); }
if($customfields) { eval("\$customfields = \"".$templates->get("member_register_additionalfields")."\";");
|
} }
|
} }
|
if(!empty($requiredfields)) { eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";"); } if(!empty($customfields)) { eval("\$customfields = \"".$templates->get("member_register_additionalfields")."\";"); }
| |
if(!isset($fromreg)) { $allownoticescheck = "checked=\"checked\"";
| if(!isset($fromreg)) { $allownoticescheck = "checked=\"checked\"";
|
Zeile 1100 | Zeile 1119 |
---|
{ // JS validator extra for our default CAPTCHA $validator_extra .= "
|
{ // JS validator extra for our default CAPTCHA $validator_extra .= "
|
$(\"#imagestring\").rules(\"add\", {
| $('#imagestring').rules('add', {
|
required: true, remote:{
|
required: true, remote:{
|
url: \"xmlhttp.php?action=validate_captcha\", type: \"post\", dataType: \"json\",
| url: 'xmlhttp.php?action=validate_captcha', type: 'post', dataType: 'json',
|
data: {
|
data: {
|
imagehash: $('#imagehash').val(),
| imagehash: function () { return $('#imagehash').val(); },
|
my_post_key: my_post_key }, }, messages: {
|
my_post_key: my_post_key }, }, messages: {
|
remote: \"{$lang->js_validator_no_image_text}\"
| remote: '{$lang->js_validator_no_image_text}'
|
} });\n"; }
| } });\n"; }
|
Zeile 1147 | Zeile 1168 |
---|
eval("\$questionbox = \"".$templates->get("member_register_question")."\";"); $validator_extra .= "
|
eval("\$questionbox = \"".$templates->get("member_register_question")."\";"); $validator_extra .= "
|
$(\"#answer\").rules(\"add\", {
| $('#answer').rules('add', {
|
required: true, remote:{
|
required: true, remote:{
|
url: \"xmlhttp.php?action=validate_question\", type: \"post\", dataType: \"json\",
| url: 'xmlhttp.php?action=validate_question', type: 'post', dataType: 'json',
|
data: {
|
data: {
|
question: $('#question_id').val(),
| question: function () { return $('#question_id').val(); },
|
my_post_key: my_post_key }, }, messages: {
|
my_post_key: my_post_key }, }, messages: {
|
remote: \"{$lang->js_validator_no_security_question}\"
| remote: '{$lang->js_validator_no_security_question}'
|
} });\n"; }
| } });\n"; }
|
Zeile 1185 | Zeile 1208 |
---|
$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']); $validator_extra .= "
|
$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']); $validator_extra .= "
|
$(\"#password\").rules(\"add\", {
| $('#password').rules('add', {
|
required: true, minlength: {$mybb->settings['minpasswordlength']}, remote:{
|
required: true, minlength: {$mybb->settings['minpasswordlength']}, remote:{
|
url: \"xmlhttp.php?action=complex_password\", type: \"post\", dataType: \"json\",
| url: 'xmlhttp.php?action=complex_password', type: 'post', dataType: 'json',
|
data: { my_post_key: my_post_key }, }, messages: {
|
data: { my_post_key: my_post_key }, }, messages: {
|
minlength: \"{$lang->js_validator_password_length}\", required: \"{$lang->js_validator_password_length}\", remote: \"{$lang->js_validator_no_image_text}\"
| minlength: '{$lang->js_validator_password_length}', required: '{$lang->js_validator_password_length}', remote: '{$lang->js_validator_no_image_text}'
|
} });\n"; } else { $validator_extra .= "
|
} });\n"; } else { $validator_extra .= "
|
$(\"#password\").rules(\"add\", {
| $('#password').rules('add', {
|
required: true, minlength: {$mybb->settings['minpasswordlength']}, messages: {
|
required: true, minlength: {$mybb->settings['minpasswordlength']}, messages: {
|
minlength: \"{$lang->js_validator_password_length}\", required: \"{$lang->js_validator_password_length}\"
| minlength: '{$lang->js_validator_password_length}', required: '{$lang->js_validator_password_length}'
|
} });\n"; }
$validator_extra .= "
|
} });\n"; }
$validator_extra .= "
|
$(\"#password2\").rules(\"add\", {
| $('#password2').rules('add', {
|
required: true, minlength: {$mybb->settings['minpasswordlength']},
|
required: true, minlength: {$mybb->settings['minpasswordlength']},
|
equalTo: \"#password\",
| equalTo: '#password',
|
messages: {
|
messages: {
|
minlength: \"{$lang->js_validator_password_length}\", required: \"{$lang->js_validator_password_length}\", equalTo: \"{$lang->js_validator_password_matches}\"
| minlength: '{$lang->js_validator_password_length}', required: '{$lang->js_validator_password_length}', equalTo: '{$lang->js_validator_password_matches}'
|
} });\n";
| } });\n";
|
Zeile 1236 | Zeile 1259 |
---|
if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minnamelength'] > 0) { $lang->js_validator_username_length = $lang->sprintf($lang->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settings['maxnamelength']);
|
if($mybb->settings['maxnamelength'] > 0 && $mybb->settings['minnamelength'] > 0) { $lang->js_validator_username_length = $lang->sprintf($lang->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settings['maxnamelength']);
|
}
| }
|
$languages = $lang->get_languages(); $langoptions = $boardlanguage = ''; if(count($languages) > 1)
| $languages = $lang->get_languages(); $langoptions = $boardlanguage = ''; if(count($languages) > 1)
|
Zeile 1254 | Zeile 1277 |
---|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
|
eval('$langoptions .= "'.$templates->get('usercp_options_language_option').'";'); }
|
|
|
eval('$boardlanguage = "'.$templates->get('member_register_language').'";'); }
| eval('$boardlanguage = "'.$templates->get('member_register_language').'";'); }
|
Zeile 1262 | Zeile 1285 |
---|
$time = TIME_NOW;
$plugins->run_hooks("member_register_end");
|
$time = TIME_NOW;
$plugins->run_hooks("member_register_end");
|
|
|
eval("\$registration = \"".$templates->get("member_register")."\";"); output_page($registration); }
| eval("\$registration = \"".$templates->get("member_register")."\";"); output_page($registration); }
|
Zeile 1271 | Zeile 1294 |
---|
if($mybb->input['action'] == "activate") { $plugins->run_hooks("member_activate_start");
|
if($mybb->input['action'] == "activate") { $plugins->run_hooks("member_activate_start");
|
if(isset($mybb->input['username'])) { $mybb->input['username'] = $mybb->get_input('username'); $options = array( 'username_method' => $mybb->settings['username_method'], 'fields' => '*',
| if(isset($mybb->input['username'])) { $mybb->input['username'] = $mybb->get_input('username'); $options = array( 'username_method' => $mybb->settings['username_method'], 'fields' => '*',
|
); $user = get_user_by_username($mybb->input['username'], $options); if(!$user)
| ); $user = get_user_by_username($mybb->input['username'], $options); if(!$user)
|
Zeile 1302 | Zeile 1325 |
---|
} else {
|
} else {
|
$user = get_user($mybb->get_input('uid', 1));
| $user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
|
} if(isset($mybb->input['code']) && $user) { $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(isset($mybb->input['code']) && $user) { $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'])
|
{
| {
|
error($lang->error_alreadyactivated); } if($activation['code'] != $mybb->get_input('code')) { error($lang->error_badactivationcode);
|
error($lang->error_alreadyactivated); } if($activation['code'] != $mybb->get_input('code')) { error($lang->error_badactivationcode);
|
}
if($activation['type'] == "b" && $activation['validated'] == 1) { error($lang->error_alreadyvalidated);
| }
if($activation['type'] == "b" && $activation['validated'] == 1) { error($lang->error_alreadyvalidated);
|
}
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");
| }
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");
|
Zeile 1331 | Zeile 1354 |
---|
$cache->update_awaitingactivation(); } if($activation['type'] == "e")
|
$cache->update_awaitingactivation(); } if($activation['type'] == "e")
|
{
| {
|
$newemail = array( "email" => $db->escape_string($activation['misc']), );
| $newemail = array( "email" => $db->escape_string($activation['misc']), );
|
Zeile 1341 | Zeile 1364 |
---|
redirect("usercp.php", $lang->redirect_emailupdated); } elseif($activation['type'] == "b")
|
redirect("usercp.php", $lang->redirect_emailupdated); } elseif($activation['type'] == "b")
|
{
| {
|
$update = array( "validated" => 1, );
| $update = array( "validated" => 1, );
|
Zeile 1360 | Zeile 1383 |
---|
else { $plugins->run_hooks("member_activate_form");
|
else { $plugins->run_hooks("member_activate_form");
|
$code = $mybb->get_input('code');
| $code = htmlspecialchars_uni($mybb->get_input('code'));
|
if(!isset($user['username'])) { $user['username'] = '';
| if(!isset($user['username'])) { $user['username'] = '';
|
Zeile 1378 | Zeile 1401 |
---|
$plugins->run_hooks("member_resendactivation");
if($mybb->settings['regtype'] == "admin")
|
$plugins->run_hooks("member_resendactivation");
if($mybb->settings['regtype'] == "admin")
|
{
| {
|
error($lang->error_activated_by_admin); } if($mybb->user['uid'] && $mybb->user['usergroup'] != 5)
|
error($lang->error_activated_by_admin); } if($mybb->user['uid'] && $mybb->user['usergroup'] != 5)
|
{ error($lang->error_alreadyactivated);
| { error($lang->error_alreadyactivated);
|
}
$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='b'"); $activation = $db->fetch_array($query);
|
}
$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='b'"); $activation = $db->fetch_array($query);
|
|
|
if($activation['validated'] == 1) { error($lang->error_activated_by_admin); }
|
if($activation['validated'] == 1) { error($lang->error_activated_by_admin); }
|
|
|
$plugins->run_hooks("member_resendactivation_end");
eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
| $plugins->run_hooks("member_resendactivation_end");
eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
|
Zeile 1403 | Zeile 1426 |
---|
if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_resendactivation_start");
|
if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post") { $plugins->run_hooks("member_do_resendactivation_start");
|
|
|
if($mybb->settings['regtype'] == "admin") { error($lang->error_activated_by_admin);
| if($mybb->settings['regtype'] == "admin") { error($lang->error_activated_by_admin);
|
Zeile 1565 | Zeile 1588 |
---|
} else {
|
} else {
|
$user = get_user($mybb->get_input('uid', 1));
| $user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
|
} if(isset($mybb->input['code']) && $user) {
|
} if(isset($mybb->input['code']) && $user) {
|
$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='p'"); $activation = $db->fetch_array($query);
| $query = $db->simple_select("awaitingactivation", "code", "uid='".$user['uid']."' AND type='p'"); $activationcode = $db->fetch_field($query, 'code');
|
$now = TIME_NOW;
|
$now = TIME_NOW;
|
if($activation['code'] != $mybb->get_input('code'))
| if(!$activationcode || $activationcode != $mybb->get_input('code'))
|
{ error($lang->error_badlostpwcode); }
| { error($lang->error_badlostpwcode); }
|
Zeile 1705 | Zeile 1728 |
---|
$mybb->input['url'] = $mybb->get_input('url');
|
$mybb->input['url'] = $mybb->get_input('url');
|
if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false)
| if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false && !preg_match('#^javascript:#i', $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) {
| { 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) {
|
Zeile 1770 | Zeile 1793 |
---|
$captcha = $login_captcha->build_hidden_captcha(); } }
|
$captcha = $login_captcha->build_hidden_captcha(); } }
|
elseif($login_captcha->type == 2)
| elseif($login_captcha->type == 2 || $login_captcha->type == 4)
|
{ $login_captcha->build_recaptcha();
|
{ $login_captcha->build_recaptcha();
|
} elseif($login_captcha->type == 3) { $login_captcha->build_ayah();
| |
}
if($login_captcha->html)
| }
if($login_captcha->html)
|
Zeile 1790 | Zeile 1809 |
---|
if(isset($mybb->input['username']) && $mybb->request_method == "post") { $username = htmlspecialchars_uni($mybb->get_input('username'));
|
if(isset($mybb->input['username']) && $mybb->request_method == "post") { $username = htmlspecialchars_uni($mybb->get_input('username'));
|
}
| }
|
if(isset($mybb->input['password']) && $mybb->request_method == "post") {
| if(isset($mybb->input['password']) && $mybb->request_method == "post") {
|
Zeile 1815 | Zeile 1834 |
---|
break; default: break;
|
break; default: break;
|
}
| }
|
$plugins->run_hooks("member_login_end");
| $plugins->run_hooks("member_login_end");
|
Zeile 1852 | Zeile 1871 |
---|
// 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}'");
|
// 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");
| }
$plugins->run_hooks("member_logout_end");
|
redirect("index.php", $lang->redirect_loggedout); }
|
redirect("index.php", $lang->redirect_loggedout); }
|
|
|
if($mybb->input['action'] == "viewnotes") {
|
if($mybb->input['action'] == "viewnotes") {
|
$uid = $mybb->get_input('uid', 1);
| $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
|
$user = get_user($uid);
// Make sure we are looking at a real user here. if(!$user)
|
$user = get_user($uid);
// Make sure we are looking at a real user here. if(!$user)
|
{
| {
|
error($lang->error_nomember);
|
error($lang->error_nomember);
|
}
| }
|
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1) { error_no_permission(); }
|
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1) { error_no_permission(); }
|
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);
| $lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);
|
$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));
|
$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));
|
| $plugins->run_hooks('member_viewnotes');
|
eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";"); echo $viewnotes;
| eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";"); echo $viewnotes;
|
Zeile 1893 | Zeile 1914 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
$uid = $mybb->get_input('uid', 1);
| $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
|
if($uid) { $memprofile = get_user($uid);
| if($uid) { $memprofile = get_user($uid);
|
Zeile 1943 | Zeile 1964 |
---|
$website = $sendemail = $sendpm = $contact_details = '';
|
$website = $sendemail = $sendpm = $contact_details = '';
|
if($memprofile['website'] && $mybb->settings['hidewebsite'] != -1 && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)
| if($memprofile['website'] && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)
|
{ $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $bgcolor = alt_trow();
| { $memprofile['website'] = htmlspecialchars_uni($memprofile['website']); $bgcolor = alt_trow();
|
Zeile 1963 | Zeile 1984 |
---|
} $contact_fields = array();
|
} $contact_fields = array();
|
| $any_contact_field = false;
|
foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $field) { $contact_fields[$field] = '';
|
foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $field) { $contact_fields[$field] = '';
|
| |
$settingkey = 'allow'.$field.'field';
|
$settingkey = 'allow'.$field.'field';
|
if(!empty($memprofile[$field]) && ($mybb->settings[$settingkey] == -1 || $mybb->settings[$settingkey] != '' && is_member($mybb->settings[$settingkey], array('usergroup' => $memprofile['usergroup'], 'additionalgroups' => $memprofile['additionalgroups']))))
| if(!empty($memprofile[$field]) && is_member($mybb->settings[$settingkey], array('usergroup' => $memprofile['usergroup'], 'additionalgroups' => $memprofile['additionalgroups'])))
|
{
|
{
|
| $any_contact_field = true;
|
if($field == 'icq') { $memprofile[$field] = (int)$memprofile[$field];
| if($field == 'icq') { $memprofile[$field] = (int)$memprofile[$field];
|
Zeile 1983 | Zeile 2006 |
---|
$bgcolors[$field] = alt_trow(); eval('$contact_fields[\''.$field.'\'] = "'.$templates->get($tmpl).'";');
|
$bgcolors[$field] = alt_trow(); eval('$contact_fields[\''.$field.'\'] = "'.$templates->get($tmpl).'";');
|
} else { $memprofile[$field] = '';
| |
} }
|
} }
|
if(!empty($contact_fields) || $sendemail || $sendpm || $website) {
| if($any_contact_field || $sendemail || $sendpm || $website) {
|
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";'); }
$signature = '';
|
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";'); }
$signature = '';
|
if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && $mybb->settings['hidesignatures'] != -1 && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])
| if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])
|
{ $sig_parser = array( "allow_html" => $mybb->settings['sightml'],
| { $sig_parser = array( "allow_html" => $mybb->settings['sightml'],
|
Zeile 2010 | Zeile 2029 |
---|
if($memperms['signofollow']) { $sig_parser['nofollow_on'] = 1;
|
if($memperms['signofollow']) { $sig_parser['nofollow_on'] = 1;
|
}
| }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) { $sig_parser['allow_imgcode'] = 0;
| if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) { $sig_parser['allow_imgcode'] = 0;
|
Zeile 2076 | Zeile 2095 |
---|
if($thread_percent > 100) { $thread_percent = 100;
|
if($thread_percent > 100) { $thread_percent = 100;
|
| }
$findposts = $findthreads = ''; if($mybb->usergroup['cansearch'] == 1) { eval("\$findposts = \"".$templates->get("member_profile_findposts")."\";"); eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");
|
}
$awaybit = '';
| }
$awaybit = '';
|
Zeile 2121 | Zeile 2147 |
---|
// Update our status to "not away" $memprofile['away'] = 0;
|
// Update our status to "not away" $memprofile['away'] = 0;
|
} }
| } }
|
// Check if our away status is set to 1, it may have been updated already (see a few lines above) if($memprofile['away'] == 1) {
| // Check if our away status is set to 1, it may have been updated already (see a few lines above) if($memprofile['away'] == 1) {
|
Zeile 2169 | Zeile 2195 |
---|
{ $lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));
|
{ $lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));
|
if($membday[2] >= 1970) { $w_day = date("l", mktime(0, 0, 0, $membday[1], $membday[0], $membday[2])); $membday = format_bdays($mybb->settings['dateformat'], $membday[1], $membday[0], $membday[2], $w_day); } else { $bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]); $membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]); $membday = date($bdayformat, $membday); }
| $bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]); $membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]); $membday = date($bdayformat, $membday);
|
$membdayage = $lang->membdayage; } elseif($membday[2]) { $membday = mktime(0, 0, 0, 1, 1, $membday[2]); $membday = date("Y", $membday);
|
$membdayage = $lang->membdayage; } elseif($membday[2]) { $membday = mktime(0, 0, 0, 1, 1, $membday[2]); $membday = date("Y", $membday);
|
$membdayage = '';
| $membdayage = '';
|
} else {
| } else {
|
Zeile 2194 | Zeile 2213 |
---|
$membday = date("F j", $membday); $membdayage = ''; }
|
$membday = date("F j", $membday); $membdayage = ''; }
|
}
| }
|
if($memprofile['birthdayprivacy'] == 'age')
|
if($memprofile['birthdayprivacy'] == 'age')
|
{ $membday = $lang->birthdayhidden;
| { $membday = $lang->birthdayhidden;
|
} else if($memprofile['birthdayprivacy'] == 'none') {
| } else if($memprofile['birthdayprivacy'] == 'none') {
|
Zeile 2210 | Zeile 2229 |
---|
{ $membday = $lang->not_specified; $membdayage = '';
|
{ $membday = $lang->not_specified; $membdayage = '';
|
}
| }
|
if(!$memprofile['displaygroup']) {
| if(!$memprofile['displaygroup']) {
|
Zeile 2227 | Zeile 2246 |
---|
"usereputationsystem" ); $displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
|
"usereputationsystem" ); $displaygroup = usergroup_displaygroup($memprofile['displaygroup']);
|
|
|
// Get the user title for this user unset($usertitle); unset($stars);
| // Get the user title for this user unset($usertitle); unset($stars);
|
Zeile 2236 | Zeile 2255 |
---|
{ // User has custom user title $usertitle = $memprofile['usertitle'];
|
{ // User has custom user title $usertitle = $memprofile['usertitle'];
|
}
| }
|
elseif(trim($displaygroup['usertitle']) != '') { // User has group title
| elseif(trim($displaygroup['usertitle']) != '') { // User has group title
|
Zeile 2246 | Zeile 2265 |
---|
{ // No usergroup title so get a default one $usertitles = $cache->read('usertitles');
|
{ // No usergroup title so get a default one $usertitles = $cache->read('usertitles');
|
if(is_array($usertitles)) {
| if(is_array($usertitles)) {
|
foreach($usertitles as $title) { if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
foreach($usertitles as $title) { if($memprofile['postnum'] >= $title['posts']) { $usertitle = $title['title'];
|
$stars = $title['stars']; $starimage = $title['starimage'];
break; }
| $stars = $title['stars']; $starimage = $title['starimage'];
break; }
|
} } }
| } } }
|
Zeile 2287 | Zeile 2306 |
---|
$stars = $title['stars']; $starimage = $title['starimage']; break;
|
$stars = $title['stars']; $starimage = $title['starimage']; break;
|
} } } }
| } } } }
|
$groupimage = ''; if(!empty($displaygroup['image'])) { if(!empty($mybb->user['language']))
|
$groupimage = ''; if(!empty($displaygroup['image'])) { if(!empty($mybb->user['language']))
|
{
| {
|
$language = $mybb->user['language']; } else
| $language = $mybb->user['language']; } else
|
Zeile 2306 | Zeile 2325 |
---|
$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']); $displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
|
$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']); $displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']); eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
|
}
| }
|
if(empty($starimage)) { $starimage = $displaygroup['starimage'];
|
if(empty($starimage)) { $starimage = $displaygroup['starimage'];
|
}
| }
|
if(!empty($starimage)) { // Only display stars if we have an image to use...
| if(!empty($starimage)) { // Only display stars if we have an image to use...
|
Zeile 2323 | Zeile 2342 |
---|
eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";"); } }
|
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 $timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60; $query = $db->simple_select("sessions", "location,nopermission", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1));
| // User is currently online and this user has permissions to view the user on the WOL $timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60; $query = $db->simple_select("sessions", "location,nopermission", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1));
|
Zeile 2333 | Zeile 2352 |
---|
if($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) { // Lastvisit
|
if($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) { // Lastvisit
|
if($memprofile['lastactive']) {
| if($memprofile['lastactive']) {
|
$memlastvisitsep = $lang->comma; $memlastvisitdate = my_date('relative', $memprofile['lastactive']); }
| $memlastvisitsep = $lang->comma; $memlastvisitdate = my_date('relative', $memprofile['lastactive']); }
|
Zeile 2413 | Zeile 2432 |
---|
if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0))) { $bg_color = alt_trow();
|
if($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0))) { $bg_color = alt_trow();
|
| if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10; }
|
$warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
| $warning_level = round($memprofile['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
|
Zeile 2445 | Zeile 2470 |
---|
{ foreach($pfcache as $customfield) {
|
{ foreach($pfcache as $customfield) {
|
if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && ($customfield['viewableby'] == '' || ($customfield['viewableby'] != -1 && !is_member($customfield['viewableby']))))
| if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && !is_member($customfield['viewableby']))
|
{ continue; }
| { continue; }
|
Zeile 2536 | Zeile 2561 |
---|
if($memban['reason']) { $memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason']));
|
if($memban['reason']) { $memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason']));
|
$memban['reason'] = my_wordwrap($memban['reason']);
| |
} else {
| } else {
|
Zeile 2637 | Zeile 2661 |
---|
{ $buddy_list = explode(',', $mybb->user['buddylist']); $ignore_list = explode(',', $mybb->user['ignorelist']);
|
{ $buddy_list = explode(',', $mybb->user['buddylist']); $ignore_list = explode(',', $mybb->user['ignorelist']);
|
|
|
if(in_array($uid, $buddy_list))
|
if(in_array($uid, $buddy_list))
|
{
| {
|
$add_remove_options = array('url' => "usercp.php?action=do_editlists&delete={$uid}&my_post_key={$mybb->post_code}", 'class' => 'remove_buddy_button', 'lang' => $lang->remove_from_buddy_list);
|
$add_remove_options = array('url' => "usercp.php?action=do_editlists&delete={$uid}&my_post_key={$mybb->post_code}", 'class' => 'remove_buddy_button', 'lang' => $lang->remove_from_buddy_list);
|
} else {
| } else {
|
$add_remove_options = array('url' => "usercp.php?action=do_editlists&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}", 'class' => 'add_buddy_button', 'lang' => $lang->add_to_buddy_list); }
if(!in_array($uid, $ignore_list))
|
$add_remove_options = array('url' => "usercp.php?action=do_editlists&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}", 'class' => 'add_buddy_button', 'lang' => $lang->add_to_buddy_list); }
if(!in_array($uid, $ignore_list))
|
{
| {
|
eval("\$buddy_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Buddy }
| eval("\$buddy_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Buddy }
|
Zeile 2659 | Zeile 2683 |
---|
else { $add_remove_options = array('url' => "usercp.php?action=do_editlists&manage=ignored&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}", 'class' => 'add_ignore_button', 'lang' => $lang->add_to_ignore_list);
|
else { $add_remove_options = array('url' => "usercp.php?action=do_editlists&manage=ignored&add_username=".urlencode($memprofile['username'])."&my_post_key={$mybb->post_code}", 'class' => 'add_ignore_button', 'lang' => $lang->add_to_ignore_list);
|
}
| }
|
if(!in_array($uid, $buddy_list)) { eval("\$ignore_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Ignore
|
if(!in_array($uid, $buddy_list)) { eval("\$ignore_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Ignore
|
}
| }
|
if(isset($memperms['canbereported']) && $memperms['canbereported'] == 1) {
| if(isset($memperms['canbereported']) && $memperms['canbereported'] == 1) {
|
Zeile 2680 | Zeile 2704 |
---|
}
if($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post")
|
}
if($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post")
|
{
| {
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
$plugins->run_hooks("member_do_emailuser_start");
|
$plugins->run_hooks("member_do_emailuser_start");
|
// Guests or those without permission can't email other users if($mybb->usergroup['cansendemail'] == 0) { error_no_permission(); }
// Check group limits if($mybb->usergroup['maxemails'] > 0) { if($mybb->user['uid'] > 0) { $user_check = "fromuid='{$mybb->user['uid']}'"; } else { $user_check = "ipaddress=".$db->escape_binary($session->packedip); }
$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "{$user_check} AND dateline >= '".(TIME_NOW - (60*60*24))."'"); $sent_count = $db->fetch_field($query, "sent_count"); if($sent_count >= $mybb->usergroup['maxemails']) { $lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']); error($lang->error_max_emails_day); } }
// Check email flood control if($mybb->usergroup['emailfloodtime'] > 0) { if($mybb->user['uid'] > 0) { $user_check = "fromuid='{$mybb->user['uid']}'"; } else { $user_check = "ipaddress=".$db->escape_binary($session->packedip); }
| // Guests or those without permission can't email other users if($mybb->usergroup['cansendemail'] == 0) { error_no_permission(); }
// Check group limits if($mybb->usergroup['maxemails'] > 0) { if($mybb->user['uid'] > 0) { $user_check = "fromuid='{$mybb->user['uid']}'"; } else { $user_check = "ipaddress=".$db->escape_binary($session->packedip); }
$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "{$user_check} AND dateline >= '".(TIME_NOW - (60*60*24))."'"); $sent_count = $db->fetch_field($query, "sent_count"); if($sent_count >= $mybb->usergroup['maxemails']) { $lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']); error($lang->error_max_emails_day); } }
// Check email flood control if($mybb->usergroup['emailfloodtime'] > 0) { if($mybb->user['uid'] > 0) { $user_check = "fromuid='{$mybb->user['uid']}'"; } else { $user_check = "ipaddress=".$db->escape_binary($session->packedip); }
|
$timecut = TIME_NOW-$mybb->usergroup['emailfloodtime']*60;
$query = $db->simple_select("maillogs", "mid, dateline", "{$user_check} AND dateline > '{$timecut}'", array('order_by' => "dateline", 'order_dir' => "DESC"));
| $timecut = TIME_NOW-$mybb->usergroup['emailfloodtime']*60;
$query = $db->simple_select("maillogs", "mid, dateline", "{$user_check} AND dateline > '{$timecut}'", array('order_by' => "dateline", 'order_dir' => "DESC"));
|
Zeile 2740 | Zeile 2764 |
---|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_second, $mybb->usergroup['emailfloodtime']); } elseif($remaining_time < 60)
|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_second, $mybb->usergroup['emailfloodtime']); } elseif($remaining_time < 60)
|
{
| {
|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_seconds, $mybb->usergroup['emailfloodtime'], $remaining_time); } elseif($remaining_time > 60 && $remaining_time < 120)
| $lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_seconds, $mybb->usergroup['emailfloodtime'], $remaining_time); } elseif($remaining_time > 60 && $remaining_time < 120)
|
Zeile 2756 | Zeile 2780 |
---|
error($lang->error_emailflooding); } }
|
error($lang->error_emailflooding); } }
|
$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', 1)."'");
| $query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
|
$to_user = $db->fetch_array($query);
if(!$to_user['username'])
|
$to_user = $db->fetch_array($query);
if(!$to_user['username'])
|
{ error($lang->error_invalidusername); }
if($to_user['hideemail'] != 0) { error($lang->error_hideemail);
| { error($lang->error_invalidusername); }
if($to_user['hideemail'] != 0) { error($lang->error_hideemail); }
$errors = array();
if($mybb->user['uid']) { $mybb->input['fromemail'] = $mybb->user['email']; $mybb->input['fromname'] = $mybb->user['username'];
|
}
|
}
|
$errors = array();
| |
if(!validate_email_format($mybb->input['fromemail']))
|
if(!validate_email_format($mybb->input['fromemail']))
|
{
| {
|
$errors[] = $lang->error_invalidfromemail; }
if(empty($mybb->input['fromname']))
|
$errors[] = $lang->error_invalidfromemail; }
if(empty($mybb->input['fromname']))
|
{
| {
|
$errors[] = $lang->error_noname; }
| $errors[] = $lang->error_noname; }
|
Zeile 2808 | Zeile 2838 |
---|
}
if(count($errors) == 0)
|
}
if(count($errors) == 0)
|
{ if($mybb->settings['mail_handler'] == 'smtp') {
| { if($mybb->settings['mail_handler'] == 'smtp') {
|
$from = $mybb->input['fromemail']; } else
| $from = $mybb->input['fromemail']; } else
|
Zeile 2896 | Zeile 2926 |
---|
$query = $db->simple_select("maillogs", "mid, dateline", "{$user_check} AND dateline > '{$timecut}'", array('order_by' => "dateline", 'order_dir' => "DESC")); $last_email = $db->fetch_array($query);
|
$query = $db->simple_select("maillogs", "mid, dateline", "{$user_check} AND dateline > '{$timecut}'", array('order_by' => "dateline", 'order_dir' => "DESC")); $last_email = $db->fetch_array($query);
|
|
|
// Users last email was within the flood time, show the error if($last_email['mid']) {
| // Users last email was within the flood time, show the error if($last_email['mid']) {
|
Zeile 2907 | Zeile 2937 |
---|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_second, $mybb->usergroup['emailfloodtime']); } elseif($remaining_time < 60)
|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_second, $mybb->usergroup['emailfloodtime']); } elseif($remaining_time < 60)
|
{
| {
|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_seconds, $mybb->usergroup['emailfloodtime'], $remaining_time); } elseif($remaining_time > 60 && $remaining_time < 120) { $lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_minute, $mybb->usergroup['emailfloodtime']);
|
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_seconds, $mybb->usergroup['emailfloodtime'], $remaining_time); } elseif($remaining_time > 60 && $remaining_time < 120) { $lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_1_minute, $mybb->usergroup['emailfloodtime']);
|
}
| }
|
else { $remaining_time_minutes = ceil($remaining_time/60);
| else { $remaining_time_minutes = ceil($remaining_time/60);
|
Zeile 2922 | Zeile 2952 |
---|
error($lang->error_emailflooding); }
|
error($lang->error_emailflooding); }
|
}
$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".$mybb->get_input('uid', 1)."'");
| }
$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
|
$to_user = $db->fetch_array($query);
|
$to_user = $db->fetch_array($query);
|
|
|
$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);
if(!$to_user['uid'])
|
$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);
if(!$to_user['uid'])
|
{
| {
|
error($lang->error_invaliduser); }
| error($lang->error_invaliduser); }
|
Zeile 2940 | Zeile 2970 |
---|
}
if($to_user['ignorelist'] && (my_strpos(",".$to_user['ignorelist'].",", ",".$mybb->user['uid'].",") !== false && $mybb->usergroup['cansendemailoverride'] != 1))
|
}
if($to_user['ignorelist'] && (my_strpos(",".$to_user['ignorelist'].",", ",".$mybb->user['uid'].",") !== false && $mybb->usergroup['cansendemailoverride'] != 1))
|
{
| {
|
error_no_permission(); }
if(isset($errors) && count($errors) > 0)
|
error_no_permission(); }
if(isset($errors) && count($errors) > 0)
|
{
| {
|
$errors = inline_error($errors); $fromname = htmlspecialchars_uni($mybb->get_input('fromname')); $fromemail = htmlspecialchars_uni($mybb->get_input('fromemail'));
| $errors = inline_error($errors); $fromname = htmlspecialchars_uni($mybb->get_input('fromname')); $fromemail = htmlspecialchars_uni($mybb->get_input('fromemail'));
|
Zeile 2959 | Zeile 2989 |
---|
$fromemail = ''; $subject = ''; $message = '';
|
$fromemail = ''; $subject = ''; $message = '';
|
}
| }
|
// Generate CAPTCHA? if($mybb->settings['captchaimage'] && $mybb->user['uid'] == 0) {
| // Generate CAPTCHA? if($mybb->settings['captchaimage'] && $mybb->user['uid'] == 0) {
|
Zeile 2975 | Zeile 3005 |
---|
else { $captcha = '';
|
else { $captcha = '';
|
}
| }
|
$from_email = ''; if($mybb->user['uid'] == 0)
|
$from_email = ''; if($mybb->user['uid'] == 0)
|
{
| {
|
eval("\$from_email = \"".$templates->get("member_emailuser_guest")."\";");
|
eval("\$from_email = \"".$templates->get("member_emailuser_guest")."\";");
|
} else { eval("\$from_email = \"".$templates->get("member_emailuser_hidden")."\";");
| |
}
$plugins->run_hooks("member_emailuser_end");
| }
$plugins->run_hooks("member_emailuser_end");
|