Vergleich member.php - 1.8.22 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 16Zeile 16
$nosession['avatar'] = 1;

$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads";

$nosession['avatar'] = 1;

$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads";

$templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hidden,post_captcha,member_register_referrer";
$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";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields";

$templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden,post_captcha,member_register_referrer";
$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_manageban,member_profile_adminoptions,member_profile";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_referrals_link,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields";

$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi";

$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi";

Zeile 789Zeile 789
		{
$lang->js_validator_username_length = $lang->sprintf($lang->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settings['maxnamelength']);
}

		{
$lang->js_validator_username_length = $lang->sprintf($lang->js_validator_username_length, $mybb->settings['minnamelength'], $mybb->settings['maxnamelength']);
}


$validator_javascript = "<script type=\"text/javascript\">
$(function() {
$('#registration_form').validate({
rules: {
username: {
required: true,
minlength: {$mybb->settings['minnamelength']},
maxlength: {$mybb->settings['maxnamelength']},
remote: {
url: 'xmlhttp.php?action=username_availability',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
},
email: {
required: true,
email: true,
remote: {
url: 'xmlhttp.php?action=email_availability',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
},
email2: {
required: true,
email: true,
equalTo: '#email'
},
},
messages: {
username: {
minlength: '{$lang->js_validator_username_length}',
maxlength: '{$lang->js_validator_username_length}',
},
email: '{$lang->js_validator_invalid_email}',
email2: '{$lang->js_validator_email_match}',
},
errorPlacement: function(error, element) {
if(element.is(':checkbox') || element.is(':radio'))
error.insertAfter($('input[name=\"' + element.attr('name') + '\"]').last().next('span'));
else
error.insertAfter(element);
}
});\n";

 

if(isset($mybb->input['timezoneoffset']))
{


if(isset($mybb->input['timezoneoffset']))
{

Zeile 907Zeile 854
				if(!$ref['uid'])
{
$errors[] = $lang->error_badreferrer;

				if(!$ref['uid'])
{
$errors[] = $lang->error_badreferrer;

				}
}
else

				}
}
else

			{
$referrername = '';
}
if(isset($quickreg))

			{
$referrername = '';
}
if(isset($quickreg))

			{

			{

				$refbg = "trow1";
}
else

				$refbg = "trow1";
}
else

Zeile 922Zeile 869
				$refbg = "trow2";
}
eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

				$refbg = "trow2";
}
eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

		}

		}

		else
{
$referrer = '';

		else
{
$referrer = '';

		}

		}

		$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
// Custom profile fields baby!
$altbg = "trow1";

		$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
// Custom profile fields baby!
$altbg = "trow1";

Zeile 942Zeile 889
		}

$pfcache = $cache->read('profilefields');

		}

$pfcache = $cache->read('profilefields');





		if(is_array($pfcache))
{

		if(is_array($pfcache))
{

 
			$jsvar_reqfields = array();

			foreach($pfcache as $profilefield)
{
if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))

			foreach($pfcache as $profilefield)
{
if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))

Zeile 963Zeile 911
				$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
if($errors && isset($mybb->input['profile_fields'][$field]))

				$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];
}
else

					$userfield = $mybb->input['profile_fields'][$field];
}
else

				{

				{

					$userfield = '';
}
if($type == "multiselect")

					$userfield = '';
}
if($type == "multiselect")

				{
if($errors)
{
$useropts = $userfield;
}

				{
if($errors)
{
$useropts = $userfield;
}

					else
{
$useropts = explode("\n", $userfield);

					else
{
$useropts = explode("\n", $userfield);

Zeile 994Zeile 942
						{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

						{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);


$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])
{
$profilefield['length'] = 3;
}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
}
}
elseif($type == "select")
{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);




























							$sel = "";

							$sel = "";

							if($val == $userfield)


























							if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])
{
$profilefield['length'] = 3;
}

eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
}
}
elseif($type == "select")
{
$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 == $userfield)

							{
$sel = ' selected="selected"';
}

							{
$sel = ' selected="selected"';
}

Zeile 1042Zeile 990
					if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

					if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

						{
$checked = "";
if($val == $userfield)
{

						{
$checked = "";
if($val == $userfield)
{

								$checked = 'checked="checked"';
}


								$checked = 'checked="checked"';
}


Zeile 1058Zeile 1006
					if($errors)
{
$useropts = $userfield;

					if($errors)
{
$useropts = $userfield;

					}

					}

					else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

					else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

					{

					{

						foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);

						foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);

					if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{

					if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{

							$checked = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{

							$checked = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{

Zeile 1082Zeile 1030
							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");

							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");

						}
}

						}
}

				}
elseif($type == "textarea")

				}
elseif($type == "textarea")

				{
$value = htmlspecialchars_uni($userfield);

				{
$value = htmlspecialchars_uni($userfield);

					eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}
else

					eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}
else

				{

				{

					$value = htmlspecialchars_uni($userfield);
$maxlength = "";
if($profilefield['maxlength'] > 0)

					$value = htmlspecialchars_uni($userfield);
$maxlength = "";
if($profilefield['maxlength'] > 0)

					{

					{

						$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}


						$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}


Zeile 1107Zeile 1055
					// JS validator extra, choose correct selectors for everything except single select which always has value
if($type != 'select')
{

					// JS validator extra, choose correct selectors for everything except single select which always has value
if($type != 'select')
{

						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}]\"]')";
}

$validator_javascript .= "
{$inp_selector}.rules('add', {
required: true,
messages: {
required: '{$lang->js_validator_not_empty}'
}
});\n";

						$jsvar_reqfields[] = array(
'type' => $type,
'fid' => $field,
);





















					}

eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";");

					}

eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";");

Zeile 1170Zeile 1098
			$regerrors = '';
}
// Spambot registration image thingy

			$regerrors = '';
}
// Spambot registration image thingy

 
		$captcha_html = 0;

		if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';

		if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';

Zeile 1177Zeile 1106

if($captcha->html)
{


if($captcha->html)
{

 
				$captcha_html = 1;

				$regimage = $captcha->html;

				$regimage = $captcha->html;


if($mybb->settings['captchaimage'] == 1)
{
// JS validator extra for our default CAPTCHA
$validator_javascript .= "
$('#imagestring').rules('add', {
required: true,
remote:{
url: 'xmlhttp.php?action=validate_captcha',
type: 'post',
dataType: 'json',
data:
{
imagehash: function () {
return $('#imagehash').val();
},
my_post_key: my_post_key
},
},
messages: {
remote: '{$lang->js_validator_no_image_text}'
}
});\n";
}

 
			}
}

// Security Question
$questionbox = '';

			}
}

// Security Question
$questionbox = '';

 
		$question_exists = 0;

		if($mybb->settings['securityquestion'])
{
$sid = generate_question();

		if($mybb->settings['securityquestion'])
{
$sid = generate_question();

Zeile 1218Zeile 1125
			");
if($db->num_rows($query) > 0)
{

			");
if($db->num_rows($query) > 0)
{

 
				$question_exists = 1;

				$question = $db->fetch_array($query);

				$question = $db->fetch_array($query);

				



				//Set parser options for security question
$parser_options = array(
"allow_html" => 0,

				//Set parser options for security question
$parser_options = array(
"allow_html" => 0,

Zeile 1247Zeile 1155
				}

eval("\$questionbox = \"".$templates->get("member_register_question")."\";");

				}

eval("\$questionbox = \"".$templates->get("member_register_question")."\";");


$validator_javascript .= "
$('#answer').rules('add', {
required: true,
remote:{
url: 'xmlhttp.php?action=validate_question',
type: 'post',
dataType: 'json',
data:
{
question: function () {
return $('#question_id').val();
},
my_post_key: my_post_key
},
},
messages: {
remote: '{$lang->js_validator_no_security_question}'
}
});\n";
}
}


			}
}






















		$hiddencaptcha = '';
// Hidden CAPTCHA for Spambots
if($mybb->settings['hiddencaptchaimage'])

		$hiddencaptcha = '';
// Hidden CAPTCHA for Spambots
if($mybb->settings['hiddencaptchaimage'])

Zeile 1282Zeile 1170
		{
// JS validator extra
$lang->js_validator_password_length = $lang->sprintf($lang->js_validator_password_length, $mybb->settings['minpasswordlength']);

		{
// JS validator extra
$lang->js_validator_password_length = $lang->sprintf($lang->js_validator_password_length, $mybb->settings['minpasswordlength']);


$validator_javascript .= "
$.validator.addMethod('passwordSecurity', function(value, element, param) {
return !(
($('#email').val() != '' && value == $('#email').val()) ||
($('#username').val() != '' && value == $('#username').val()) ||
($('#email').val() != '' && value.indexOf($('#email').val()) > -1) ||
($('#username').val() != '' && value.indexOf($('#username').val()) > -1) ||
($('#email').val() != '' && $('#email').val().indexOf(value) > -1) ||
($('#username').val() != '' && $('#username').val().indexOf(value) > -1)
);
}, '{$lang->js_validator_bad_password_security}');\n";

 

// See if the board has "require complex passwords" enabled.
if($mybb->settings['requirecomplexpasswords'] == 1)


// See if the board has "require complex passwords" enabled.
if($mybb->settings['requirecomplexpasswords'] == 1)

			{

			{

				$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']);

				$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']);


$validator_javascript .= "
$('#password').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
remote:{
url: 'xmlhttp.php?action=complex_password',
type: 'post',
dataType: 'json',
data:
{
my_post_key: my_post_key
},
},
passwordSecurity: '',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
remote: '{$lang->js_validator_no_image_text}'
}
});\n";
}
else
{
$validator_javascript .= "
$('#password').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
passwordSecurity: '',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}'
}
});\n";

 
			}

			}


$validator_javascript .= "
$('#password2').rules('add', {
required: true,
minlength: {$mybb->settings['minpasswordlength']},
equalTo: '#password',
messages: {
minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
equalTo: '{$lang->js_validator_password_matches}'
}
});\n";


 
			eval("\$passboxes = \"".$templates->get("member_register_password")."\";");
}


			eval("\$passboxes = \"".$templates->get("member_register_password")."\";");
}


Zeile 1374Zeile 1203
		$time = TIME_NOW;

$plugins->run_hooks("member_register_end");

		$time = TIME_NOW;

$plugins->run_hooks("member_register_end");

 
		
$jsvar_reqfields = json_encode($jsvar_reqfields);





		$validator_javascript .= "
});
</script>\n";























		$validator_javascript = "<script type=\"text/javascript\">
var regsettings = {
requiredfields: '{$jsvar_reqfields}',
minnamelength: '{$mybb->settings['minnamelength']}',
maxnamelength: '{$mybb->settings['maxnamelength']}',
minpasswordlength: '{$mybb->settings['minpasswordlength']}',
captchaimage: '{$mybb->settings['captchaimage']}',
captchahtml: '{$captcha_html}',
securityquestion: '{$mybb->settings['securityquestion']}',
questionexists: '{$question_exists}',
requirecomplexpasswords: '{$mybb->settings['requirecomplexpasswords']}',
regtype: '{$mybb->settings['regtype']}',
hiddencaptchaimage: '{$mybb->settings['hiddencaptchaimage']}'
};

lang.js_validator_username_length = '{$lang->js_validator_username_length}';
lang.js_validator_invalid_email = '{$lang->js_validator_invalid_email}';
lang.js_validator_email_match = '{$lang->js_validator_email_match}';
lang.js_validator_not_empty = '{$lang->js_validator_not_empty}';
lang.js_validator_password_length = '{$lang->js_validator_password_length}';
lang.js_validator_password_matches = '{$lang->js_validator_password_matches}';
lang.js_validator_no_image_text = '{$lang->js_validator_no_image_text}';
lang.js_validator_no_security_question = '{$lang->js_validator_no_security_question}';
lang.js_validator_bad_password_security = '{$lang->js_validator_bad_password_security}';
</script>\n";


eval("\$registration = \"".$templates->get("member_register")."\";");
output_page($registration);


eval("\$registration = \"".$templates->get("member_register")."\";");
output_page($registration);

Zeile 1519Zeile 1372
	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a.validated
FROM ".TABLE_PREFIX."users u

	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code, a.type, a.validated
FROM ".TABLE_PREFIX."users u

		LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND a.type='r' OR a.type='b')

		LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND (a.type='r' OR a.type='b'))

		WHERE u.email='".$db->escape_string($mybb->get_input('email'))."'
");
$numusers = $db->num_rows($query);

		WHERE u.email='".$db->escape_string($mybb->get_input('email'))."'
");
$numusers = $db->num_rows($query);

Zeile 1840Zeile 1693
		my_mail($email, $emailsubject, $emailmessage);

$plugins->run_hooks("member_resetpassword_reset");

		my_mail($email, $emailsubject, $emailmessage);

$plugins->run_hooks("member_resetpassword_reset");





		error($lang->redirect_passwordreset);
}
else

		error($lang->redirect_passwordreset);
}
else

Zeile 1848Zeile 1701
		$plugins->run_hooks("member_resetpassword_form");

switch($mybb->settings['username_method'])

		$plugins->run_hooks("member_resetpassword_form");

switch($mybb->settings['username_method'])

		{

		{

			case 0:
$lang_username = $lang->username;
break;

			case 0:
$lang_username = $lang->username;
break;

Zeile 1861Zeile 1714
			default:
$lang_username = $lang->username;
break;

			default:
$lang_username = $lang->username;
break;

		}

$code = htmlspecialchars_uni($mybb->get_input('code'));


		}

$code = htmlspecialchars_uni($mybb->get_input('code'));


		if(!isset($mybb->input['username']))
{
$input_username = '';

		if(!isset($mybb->input['username']))
{
$input_username = '';

Zeile 1873Zeile 1726

eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);


eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);

	}
}


	}
}


$do_captcha = $correct = false;
$inline_errors = "";
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")

$do_captcha = $correct = false;
$inline_errors = "";
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")

Zeile 1901Zeile 1754
		'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',
'username_method' => (int)$mybb->settings['username_method'],

	$options = array(
'fields' => 'loginattempts',
'username_method' => (int)$mybb->settings['username_method'],

Zeile 1910Zeile 1763

$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();


	$loginhandler->set_data($user);
$validated = $loginhandler->validate_login();


Zeile 1918Zeile 1771
	{
$mybb->input['action'] = "login";
$mybb->request_method = "get";

	{
$mybb->input['action'] = "login";
$mybb->request_method = "get";





		$login_user = get_user_by_username($user['username'], array('fields' => 'uid'));

// Is a fatal call if user has had too many tries

		$login_user = get_user_by_username($user['username'], array('fields' => 'uid'));

// Is a fatal call if user has had too many tries

Zeile 1943Zeile 1796
		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		}

$loginhandler->complete_login();


		}

$loginhandler->complete_login();


		$plugins->run_hooks("member_do_login_end");

$mybb->input['url'] = $mybb->get_input('url');

		$plugins->run_hooks("member_do_login_end");

$mybb->input['url'] = $mybb->get_input('url');

Zeile 1981Zeile 1834
	}

$plugins->run_hooks("member_do_login_end");

	}

$plugins->run_hooks("member_do_login_end");

}

}


if($mybb->input['action'] == "login")
{


if($mybb->input['action'] == "login")
{

Zeile 2028Zeile 1881
				$captcha = $login_captcha->build_hidden_captcha();
}
}

				$captcha = $login_captcha->build_hidden_captcha();
}
}

		elseif(in_array($login_captcha->type, array(2, 4, 5)))

		elseif(in_array($login_captcha->type, array(4, 5, 8)))

		{
$login_captcha->build_recaptcha();

		{
$login_captcha->build_recaptcha();

 
		}
elseif(in_array($login_captcha->type, array(6, 7)))
{
$login_captcha->build_hcaptcha();

		}

if($login_captcha->html)

		}

if($login_captcha->html)

Zeile 2088Zeile 1945

// Check session ID if we have one
if(isset($mybb->input['sid']) && $mybb->get_input('sid') !== $session->sid)


// Check session ID if we have one
if(isset($mybb->input['sid']) && $mybb->get_input('sid') !== $session->sid)

	{
error($lang->error_notloggedout);

	{
error($lang->error_notloggedout);

	}
// Otherwise, check logoutkey
else if(!isset($mybb->input['sid']) && $mybb->get_input('logoutkey') !== $mybb->user['logoutkey'])

	}
// Otherwise, check logoutkey
else if(!isset($mybb->input['sid']) && $mybb->get_input('logoutkey') !== $mybb->user['logoutkey'])

Zeile 2106Zeile 1963
		// 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");

redirect("index.php", $lang->redirect_loggedout);

	$plugins->run_hooks("member_logout_end");

redirect("index.php", $lang->redirect_loggedout);

Zeile 2120Zeile 1977

// Make sure we are looking at a real user here.
if(!$user)


// 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();
}


$user['username'] = htmlspecialchars_uni($user['username']);
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);


$user['username'] = htmlspecialchars_uni($user['username']);
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);

Zeile 2143Zeile 2000

if($mybb->input['action'] == "profile")
{


if($mybb->input['action'] == "profile")
{

	$plugins->run_hooks("member_profile_start");


 
	if($mybb->usergroup['canviewprofiles'] == 0)

	if($mybb->usergroup['canviewprofiles'] == 0)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 2156Zeile 2011
		$memprofile = get_user($uid);
}
elseif($mybb->user['uid'])

		$memprofile = get_user($uid);
}
elseif($mybb->user['uid'])

	{

	{

		$memprofile = $mybb->user;
}
else

		$memprofile = $mybb->user;
}
else

Zeile 2170Zeile 2025
	}

$uid = $memprofile['uid'];

	}

$uid = $memprofile['uid'];

 

$plugins->run_hooks("member_profile_start");


$me_username = $memprofile['username'];
$memprofile['username'] = htmlspecialchars_uni($memprofile['username']);


$me_username = $memprofile['username'];
$memprofile['username'] = htmlspecialchars_uni($memprofile['username']);

Zeile 2600Zeile 2457
				$activity = fetch_wol_activity($session['location'], $session['nopermission']);
$location = build_friendly_wol_location($activity);
$location_time = my_date($mybb->settings['timeformat'], $last_seen);

				$activity = fetch_wol_activity($session['location'], $session['nopermission']);
$location = build_friendly_wol_location($activity);
$location_time = my_date($mybb->settings['timeformat'], $last_seen);

	



				eval("\$online_status = \"".$templates->get("member_profile_online")."\";");
}
}
}

if(!isset($online_status))

				eval("\$online_status = \"".$templates->get("member_profile_online")."\";");
}
}
}

if(!isset($online_status))

	{		

	{

		eval("\$online_status = \"".$templates->get("member_profile_offline")."\";");
}


		eval("\$online_status = \"".$templates->get("member_profile_offline")."\";");
}


Zeile 2830Zeile 2687
	$adminoptions = '';
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{

	$adminoptions = '';
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{

		eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");








		if($memperms['isbannedgroup'] == 1)
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions_manageban")."\";");
}
else
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
}

	}

	}





	$modoptions = $viewnotes = $editnotes = $editprofile = $banuser = $manageban = $manageuser = '';
$can_purge_spammer = purgespammer_show($memprofile['postnum'], $memprofile['usergroup'], $memprofile['uid']);
if($mybb->usergroup['canmodcp'] == 1 || $can_purge_spammer)

	$modoptions = $viewnotes = $editnotes = $editprofile = $banuser = $manageban = $manageuser = '';
$can_purge_spammer = purgespammer_show($memprofile['postnum'], $memprofile['usergroup'], $memprofile['uid']);
if($mybb->usergroup['canmodcp'] == 1 || $can_purge_spammer)

Zeile 2846Zeile 2710
		}

$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

		}

$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));





		if(!empty($memprofile['usernotes']))
{
if(strlen($memprofile['usernotes']) > 100)

		if(!empty($memprofile['usernotes']))
{
if(strlen($memprofile['usernotes']) > 100)

Zeile 2894Zeile 2758
	$add_remove_options = array();
$buddy_options = $ignore_options = $report_options = '';
if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)

	$add_remove_options = array();
$buddy_options = $ignore_options = $report_options = '';
if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)

	{

	{

		$buddy_list = explode(',', $mybb->user['buddylist']);
$ignore_list = explode(',', $mybb->user['ignorelist']);


		$buddy_list = explode(',', $mybb->user['buddylist']);
$ignore_list = explode(',', $mybb->user['ignorelist']);


Zeile 2910Zeile 2774
		if(!in_array($uid, $ignore_list))
{
eval("\$buddy_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Buddy

		if(!in_array($uid, $ignore_list))
{
eval("\$buddy_options = \"".$templates->get("member_profile_addremove")."\";"); // Add/Remove Buddy

		}

		}


if(in_array($uid, $ignore_list))
{


if(in_array($uid, $ignore_list))
{

Zeile 2959Zeile 2823
	verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("member_do_emailuser_start");

	verify_post_check($mybb->get_input('my_post_key'));

$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);
}

$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"));
$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error
if($last_email['mid'])
{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);

if($remaining_time == 1)
{
$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']);
}
else
{
$remaining_time_minutes = ceil($remaining_time/60);
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_minutes, $mybb->usergroup['emailfloodtime'], $remaining_time_minutes);
}

error($lang->error_emailflooding);
}
}



// 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"));
$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error
if($last_email['mid'])
{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);

if($remaining_time == 1)
{
$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']);
}
else
{
$remaining_time_minutes = ceil($remaining_time/60);
$lang->error_emailflooding = $lang->sprintf($lang->error_emailflooding_minutes, $mybb->usergroup['emailfloodtime'], $remaining_time_minutes);
}

error($lang->error_emailflooding);
}
}


	$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'])

	$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'])

	{

	{

		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();

	}

$errors = array();


if($mybb->user['uid'])
{


if($mybb->user['uid'])
{

Zeile 3053Zeile 2917
	}

if(!validate_email_format($mybb->input['fromemail']))

	}

if(!validate_email_format($mybb->input['fromemail']))

	{

	{

		$errors[] = $lang->error_invalidfromemail;
}


		$errors[] = $lang->error_invalidfromemail;
}


Zeile 3065Zeile 2929
	if(empty($mybb->input['subject']))
{
$errors[] = $lang->error_no_email_subject;

	if(empty($mybb->input['subject']))
{
$errors[] = $lang->error_no_email_subject;

	}


	}


	if(empty($mybb->input['message']))
{
$errors[] = $lang->error_no_email_message;
}

if($mybb->settings['captchaimage'] && $mybb->user['uid'] == 0)

	if(empty($mybb->input['message']))
{
$errors[] = $lang->error_no_email_message;
}

if($mybb->settings['captchaimage'] && $mybb->user['uid'] == 0)

	{

	{

		require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;


		require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;


Zeile 3086Zeile 2950
			}
}
}

			}
}
}





	if(count($errors) == 0)
{
if($mybb->settings['mail_handler'] == 'smtp')

	if(count($errors) == 0)
{
if($mybb->settings['mail_handler'] == 'smtp')

		{

		{

			$from = $mybb->input['fromemail'];
}
else

			$from = $mybb->input['fromemail'];
}
else

		{

		{

			$from = "{$mybb->input['fromname']} <{$mybb->input['fromemail']}>";
}

			$from = "{$mybb->input['fromname']} <{$mybb->input['fromemail']}>";
}





		$message = $lang->sprintf($lang->email_emailuser, $to_user['username'], $mybb->input['fromname'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->get_input('message'));

		$message = $lang->sprintf($lang->email_emailuser, $to_user['username'], $mybb->input['fromname'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->get_input('message'));

		my_mail($to_user['email'], $mybb->get_input('subject'), $message, '', '', '', false, 'text', '', $from);

if($mybb->settings['mail_logging'] > 0)
{

		my_mail($to_user['email'], $mybb->get_input('subject'), $message, '', '', '', false, 'text', '', $from);

if($mybb->settings['mail_logging'] > 0)
{

			// Log the message
$log_entry = array(
"subject" => $db->escape_string($mybb->get_input('subject')),

			// Log the message
$log_entry = array(
"subject" => $db->escape_string($mybb->get_input('subject')),

Zeile 3135Zeile 2999

// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0)


// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0)

	{
error_no_permission();
}


	{
error_no_permission();
}


	// Check group limits
if($mybb->usergroup['maxemails'] > 0)
{

	// Check group limits
if($mybb->usergroup['maxemails'] > 0)
{

Zeile 3281Zeile 3145
	}

$user = get_user($uid);

	}

$user = get_user($uid);

 
	if(!$user['$uid'])
{
error($lang->referrals_invalid_user);
}


$lang->nav_referrals = $lang->sprintf($lang->nav_referrals, $user['username']);
add_breadcrumb($lang->nav_referrals);


$lang->nav_referrals = $lang->sprintf($lang->nav_referrals, $user['username']);
add_breadcrumb($lang->nav_referrals);