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,member_register_regimage_ayah,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_ayah,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";
|
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 244 | Zeile 256 |
---|
// If we have a security question, check to see if answer is correct if($mybb->settings['securityquestion']) {
|
// If we have a security question, check to see if answer is correct if($mybb->settings['securityquestion']) {
|
$question_id = $mybb->get_input('question_id');
| $question_id = $db->escape_string($mybb->get_input('question_id'));
|
$answer = $db->escape_string($mybb->get_input('answer'));
$query = $db->query("
| $answer = $db->escape_string($mybb->get_input('answer'));
$query = $db->query("
|
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 294 | Zeile 306 |
---|
$email = htmlspecialchars_uni($mybb->get_input('email')); $email2 = htmlspecialchars_uni($mybb->get_input('email2')); $referrername = htmlspecialchars_uni($mybb->get_input('referrername'));
|
$email = htmlspecialchars_uni($mybb->get_input('email')); $email2 = htmlspecialchars_uni($mybb->get_input('email2')); $referrername = htmlspecialchars_uni($mybb->get_input('referrername'));
|
|
|
$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) { $instant_email_subscribe_selected = "selected=\"selected\""; } else if($mybb->get_input('subscriptionmethod', 1) == 3)
| else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 2) { $instant_email_subscribe_selected = "selected=\"selected\""; } 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) { $pmnoticecheck = " checked=\"checked\""; }
if($mybb->get_input('pmnotify', 1) == 1)
| if($mybb->get_input('pmnotice', MyBB::INPUT_INT) == 1) { $pmnoticecheck = " checked=\"checked\""; }
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\""; }
| { $dst_enabled_selected = "selected=\"selected\""; }
|
Zeile 370 | Zeile 382 |
---|
if($mybb->settings['captchaimage']) { $captcha->invalidate_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)) { $refbg = "trow1"; }
| } if(isset($quickreg)) { $refbg = "trow1"; }
|
else { $refbg = "trow2";
| else { $refbg = "trow2";
|
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; }
| { $usergroup = 5; }
|
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];
|
Zeile 891 | Zeile 906 |
---|
$userfield = ''; } if($type == "multiselect")
|
$userfield = ''; } if($type == "multiselect")
|
{ if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val) { $seloptions[$val] = $val; } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if($val == $seloptions[$val]) { $sel = " selected=\"selected\""; }
| { if($errors) { $useropts = $userfield; } else { $useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val) { $seloptions[$val] = $val; } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val]) { $sel = ' selected="selected"'; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length'])
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length'])
|
{
| {
|
$profilefield['length'] = 3; }
| $profilefield['length'] = 3; }
|
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")."\";"); }
|
if(!$profilefield['length']) { $profilefield['length'] = 1; }
| if(!$profilefield['length']) { $profilefield['length'] = 1; }
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";"); }
| eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";"); }
|
Zeile 960 | Zeile 975 |
---|
{ $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{
| {
|
foreach($expoptions as $key => $val) { $checked = ""; if($val == $userfield) {
|
foreach($expoptions as $key => $val) { $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 978 | Zeile 993 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else { $useropts = explode("\n", $userfield);
| else { $useropts = explode("\n", $userfield);
|
Zeile 986 | Zeile 1001 |
---|
if(is_array($useropts)) { foreach($useropts as $key => $val)
|
if(is_array($useropts)) { foreach($useropts as $key => $val)
|
{
| {
|
$seloptions[$val] = $val; } }
| $seloptions[$val] = $val; } }
|
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 1006 | Zeile 1021 |
---|
} } elseif($type == "textarea")
|
} } elseif($type == "textarea")
|
{
| {
|
$value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";"); }
| $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";"); }
|
Zeile 1023 | Zeile 1038 |
---|
}
if($profilefield['required'] == 1)
|
}
if($profilefield['required'] == 1)
|
{ // JS validator extra if($type == "checkbox" || $type == "radio") { $id = "{$field}0"; } else
| { // JS validator extra, choose correct selectors for everything except single select which always has value if($type != 'select')
|
{
|
{
|
$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")."\";");
|
}
| }
|
else { eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";"); }
|
else { eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";"); }
|
| } if($requiredfields) { eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";"); }
|
|
|
$code = ''; $select = ''; $val = ''; $options = ''; $expoptions = ''; $useropts = ''; $seloptions = '';
| 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 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) {
| } if(isset($mybb->input['code']) && $user) {
|
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);
|
}
| }
|
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'"); $username = $user['username'];
|
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND type='p'"); $username = $user['username'];
|
|
|
// 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 = 8;
|
if($password_length < 8) { $password_length = 8;
|
}
| }
|
$password = random_str($password_length); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
|
$password = random_str($password_length); $logindetails = update_password($user['uid'], md5($password), $user['salt']);
|
|
|
$email = $user['email'];
|
$email = $user['email'];
|
|
|
$plugins->run_hooks("member_resetpassword_process");
|
$plugins->run_hooks("member_resetpassword_process");
|
|
|
$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']); $emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password); my_mail($email, $emailsubject, $emailmessage);
| $emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']); $emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password); my_mail($email, $emailsubject, $emailmessage);
|
Zeile 1620 | Zeile 1643 |
---|
default: $lang_username = $lang->username; break;
|
default: $lang_username = $lang->username; break;
|
}
$code = $mybb->get_input('code');
| }
$code = $mybb->get_input('code');
|
if(!isset($user['username'])) { $user['username'] = ''; }
|
if(!isset($user['username'])) { $user['username'] = ''; }
|
|
|
eval("\$activate = \"".$templates->get("member_resetpassword")."\";"); output_page($activate); }
| eval("\$activate = \"".$templates->get("member_resetpassword")."\";"); output_page($activate); }
|
Zeile 1646 | Zeile 1669 |
---|
require_once MYBB_ROOT."inc/datahandlers/login.php"; $loginhandler = new LoginDataHandler("get");
|
require_once MYBB_ROOT."inc/datahandlers/login.php"; $loginhandler = new LoginDataHandler("get");
|
|
|
if($mybb->get_input('quick_password') && $mybb->get_input('quick_username')) { $mybb->input['password'] = $mybb->get_input('quick_password');
| if($mybb->get_input('quick_password') && $mybb->get_input('quick_username')) { $mybb->input['password'] = $mybb->get_input('quick_password');
|
Zeile 1659 | Zeile 1682 |
---|
'password' => $mybb->get_input('password'), 'remember' => $mybb->get_input('remember'), 'imagestring' => $mybb->get_input('imagestring')
|
'password' => $mybb->get_input('password'), 'remember' => $mybb->get_input('remember'), 'imagestring' => $mybb->get_input('imagestring')
|
);
| );
|
$options = array( 'fields' => 'loginattempts',
| $options = array( 'fields' => 'loginattempts',
|
Zeile 1668 | Zeile 1691 |
---|
$user_loginattempts = get_user_by_username($user['username'], $options); $user['loginattempts'] = (int)$user_loginattempts['loginattempts'];
|
$user_loginattempts = get_user_by_username($user['username'], $options); $user['loginattempts'] = (int)$user_loginattempts['loginattempts'];
|
|
|
$loginhandler->set_data($user); $validated = $loginhandler->validate_login();
if(!$validated)
|
$loginhandler->set_data($user); $validated = $loginhandler->validate_login();
if(!$validated)
|
{
| {
|
$mybb->input['action'] = "login"; $mybb->request_method = "get";
| $mybb->input['action'] = "login"; $mybb->request_method = "get";
|
Zeile 1695 | Zeile 1718 |
---|
{ // Successful login if($loginhandler->login_data['coppauser'])
|
{ // Successful login if($loginhandler->login_data['coppauser'])
|
{
| {
|
error($lang->error_awaitingcoppa); }
| error($lang->error_awaitingcoppa); }
|
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(); }
|
Zeile 1803 | Zeile 1826 |
---|
$mybb->request_method = "get";
$inline_errors = inline_error($errors);
|
$mybb->request_method = "get";
$inline_errors = inline_error($errors);
|
}
| }
|
switch($mybb->settings['username_method']) { case 1:
| switch($mybb->settings['username_method']) { case 1:
|
Zeile 1861 | Zeile 1884 |
---|
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.
| $user = get_user($uid);
// Make sure we are looking at a real user here.
|
Zeile 1878 | Zeile 1901 |
---|
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);
$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));
|
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);
$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 1918 |
---|
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 1968 |
---|
$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 1988 |
---|
} $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 2010 |
---|
$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 2033 |
---|
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) {
| if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) {
|
Zeile 2019 | Zeile 2042 |
---|
$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser); eval("\$signature = \"".$templates->get("member_profile_signature")."\";");
|
$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser); eval("\$signature = \"".$templates->get("member_profile_signature")."\";");
|
}
| }
|
$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);
if($daysreg < 1) { $daysreg = 1;
|
$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);
if($daysreg < 1) { $daysreg = 1;
|
}
$stats = $cache->read("stats");
| }
$stats = $cache->read("stats");
|
// Format post count, per day count and percent of total $ppd = $memprofile['postnum'] / $daysreg;
| // Format post count, per day count and percent of total $ppd = $memprofile['postnum'] / $daysreg;
|
Zeile 2036 | Zeile 2059 |
---|
if($ppd > $memprofile['postnum']) { $ppd = $memprofile['postnum'];
|
if($ppd > $memprofile['postnum']) { $ppd = $memprofile['postnum'];
|
}
| }
|
$numposts = $stats['numposts']; if($numposts == 0) { $post_percent = "0";
|
$numposts = $stats['numposts']; if($numposts == 0) { $post_percent = "0";
|
}
| }
|
else { $post_percent = $memprofile['postnum']*100/$numposts; $post_percent = round($post_percent, 2);
|
else { $post_percent = $memprofile['postnum']*100/$numposts; $post_percent = round($post_percent, 2);
|
}
| }
|
if($post_percent > 100) { $post_percent = 100;
| if($post_percent > 100) { $post_percent = 100;
|
Zeile 2162 | Zeile 2185 |
---|
if($memprofile['birthday']) { $membday = explode("-", $memprofile['birthday']);
|
if($memprofile['birthday']) { $membday = explode("-", $memprofile['birthday']);
|
|
|
if($memprofile['birthdayprivacy'] != 'none') { if($membday[0] && $membday[1] && $membday[2]) { $lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));
|
if($memprofile['birthdayprivacy'] != 'none') { if($membday[0] && $membday[1] && $membday[2]) { $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 { $membday = mktime(0, 0, 0, $membday[1], $membday[0], 0);
| else { $membday = mktime(0, 0, 0, $membday[1], $membday[0], 0);
|
Zeile 2210 | Zeile 2226 |
---|
{ $membday = $lang->not_specified; $membdayage = '';
|
{ $membday = $lang->not_specified; $membdayage = '';
|
}
| }
|
if(!$memprofile['displaygroup']) {
| if(!$memprofile['displaygroup']) {
|
Zeile 2227 | Zeile 2243 |
---|
"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 2252 |
---|
{ // 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 2262 |
---|
{ // 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 2303 |
---|
$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 2322 |
---|
$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 2339 |
---|
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 2349 |
---|
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 2429 |
---|
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 2467 |
---|
{ 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 2558 |
---|
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 2658 |
---|
{ $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 2680 |
---|
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 2701 |
---|
}
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 2761 |
---|
$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 2777 |
---|
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 2835 |
---|
}
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 2923 |
---|
$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 2934 |
---|
$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 2949 |
---|
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 2967 |
---|
}
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 2986 |
---|
$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 3002 |
---|
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");
|