Zeile 1574 | Zeile 1574 |
---|
} }
|
} }
|
if($mybb->input['action'] == "lostpw") { $plugins->run_hooks("member_lostpw");
eval("\$lostpw = \"".$templates->get("member_lostpw")."\";"); output_page($lostpw); }
if($mybb->input['action'] == "do_lostpw" && $mybb->request_method == "post")
| if($mybb->input['action'] == "do_lostpw" && $mybb->request_method == "post")
|
{ $plugins->run_hooks("member_do_lostpw_start");
|
{ $plugins->run_hooks("member_do_lostpw_start");
|
| $errors = array();
if($mybb->settings['captchaimage']) { require_once MYBB_ROOT.'inc/class_captcha.php'; $captcha = new captcha;
if($captcha->validate_captcha() == false) { // CAPTCHA validation failed foreach($captcha->get_errors() as $error) { $errors[] = $error; } } }
|
$email = $db->escape_string($email); $query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'");
| $email = $db->escape_string($email); $query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'");
|
Zeile 1592 | Zeile 1601 |
---|
if($numusers < 1) { error($lang->error_invalidemail);
|
if($numusers < 1) { error($lang->error_invalidemail);
|
} else { while($user = $db->fetch_array($query)) { $db->delete_query("awaitingactivation", "uid='{$user['uid']}' AND type='p'"); $user['activationcode'] = random_str(30); $now = TIME_NOW; $uid = $user['uid']; $awaitingarray = array( "uid" => $user['uid'], "dateline" => TIME_NOW, "code" => $user['activationcode'], "type" => "p" ); $db->insert_query("awaitingactivation", $awaitingarray); $username = $user['username']; $email = $user['email']; $activationcode = $user['activationcode']; $emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']); switch($mybb->settings['username_method'])
| } else { if(count($errors) == 0) { while($user = $db->fetch_array($query))
|
{
|
{
|
case 0: $emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; case 1: $emailmessage = $lang->sprintf($lang->email_lostpw1, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; case 2: $emailmessage = $lang->sprintf($lang->email_lostpw2, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; default: $emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break;
| $db->delete_query("awaitingactivation", "uid='{$user['uid']}' AND type='p'"); $user['activationcode'] = random_str(30); $now = TIME_NOW; $uid = $user['uid']; $awaitingarray = array( "uid" => $user['uid'], "dateline" => TIME_NOW, "code" => $user['activationcode'], "type" => "p" ); $db->insert_query("awaitingactivation", $awaitingarray); $username = $user['username']; $email = $user['email']; $activationcode = $user['activationcode']; $emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']); switch($mybb->settings['username_method']) { case 0: $emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; case 1: $emailmessage = $lang->sprintf($lang->email_lostpw1, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; case 2: $emailmessage = $lang->sprintf($lang->email_lostpw2, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; default: $emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); break; } my_mail($email, $emailsubject, $emailmessage);
|
}
|
}
|
my_mail($email, $emailsubject, $emailmessage);
| $plugins->run_hooks("member_do_lostpw_end");
redirect("index.php", $lang->redirect_lostpwsent, "", true); } else { $mybb->input['action'] = "lostpw"; } } }
if($mybb->input['action'] == "lostpw") { $plugins->run_hooks("member_lostpw");
$captcha = ''; // Generate CAPTCHA? if($mybb->settings['captchaimage']) { require_once MYBB_ROOT.'inc/class_captcha.php'; $post_captcha = new captcha(true, "post_captcha");
if($post_captcha->html) { $captcha = $post_captcha->html;
|
} }
|
} }
|
$plugins->run_hooks("member_do_lostpw_end");
| |
|
|
redirect("index.php", $lang->redirect_lostpwsent, "", true);
| if(isset($errors) && count($errors) > 0) { $errors = inline_error($errors); $email = htmlspecialchars_uni($mybb->get_input('email')); } else { $errors = ''; $email = ''; }
eval("\$lostpw = \"".$templates->get("member_lostpw")."\";"); output_page($lostpw);
|
}
if($mybb->input['action'] == "resetpassword")
| }
if($mybb->input['action'] == "resetpassword")
|
Zeile 1708 | Zeile 1757 |
---|
$userhandler->set_validated(true); $userhandler->errors = array();
|
$userhandler->set_validated(true); $userhandler->errors = array();
|
}
$userhandler->update_user();
| }
$userhandler->update_user();
|
$logindetails = array( 'salt' => $userhandler->data['salt'], 'password' => $userhandler->data['saltedpw'],
| $logindetails = array( 'salt' => $userhandler->data['salt'], 'password' => $userhandler->data['saltedpw'],
|
Zeile 1997 | Zeile 2046 |
---|
// 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(); }
$user['username'] = htmlspecialchars_uni($user['username']);
|
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']);
| $lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);
|
$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));
| $user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));
|
Zeile 2021 | Zeile 2070 |
---|
if($mybb->input['action'] == "profile") { $plugins->run_hooks("member_profile_start");
|
if($mybb->input['action'] == "profile") { $plugins->run_hooks("member_profile_start");
|
|
|
if($mybb->usergroup['canviewprofiles'] == 0) { error_no_permission();
| if($mybb->usergroup['canviewprofiles'] == 0) { error_no_permission();
|
Zeile 2035 | Zeile 2084 |
---|
elseif($mybb->user['uid']) { $memprofile = $mybb->user;
|
elseif($mybb->user['uid']) { $memprofile = $mybb->user;
|
}
| }
|
else { $memprofile = false; }
if(!$memprofile)
|
else { $memprofile = false; }
if(!$memprofile)
|
{
| {
|
error($lang->error_nomember); }
| error($lang->error_nomember); }
|
Zeile 2057 | Zeile 2106 |
---|
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
// Set display group $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
| if(!$memprofile['displaygroup']) { $memprofile['displaygroup'] = $memprofile['usergroup']; }
|
$displaygroup = usergroup_displaygroup($memprofile['displaygroup']); if(is_array($displaygroup)) {
| $displaygroup = usergroup_displaygroup($memprofile['displaygroup']); if(is_array($displaygroup)) {
|