本文整理匯總了PHP中BuckysUser::resetPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP BuckysUser::resetPassword方法的具體用法?PHP BuckysUser::resetPassword怎麽用?PHP BuckysUser::resetPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BuckysUser
的用法示例。
在下文中一共展示了BuckysUser::resetPassword方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: trim
if (isset($_GET['action']) && $_GET['action'] == 'verify') {
$token = trim($_GET['token']);
$email = trim($_GET['email']);
if (!$token || !$email) {
buckys_redirect("/index.php", MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
BuckysUser::verifyAccount($email, $token);
buckys_redirect("/index.php");
}
if (isset($_POST['action']) && $_POST['action'] == 'create-account') {
//Check Captcha
$resp = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if ($resp->is_valid) {
//Create New Account
$newID = BuckysUser::createNewAccount($_POST);
render_result_xml(array('status' => !$newID ? 'error' : 'success', 'message' => !$newID ? buckys_get_messages() : MSG_NEW_ACCOUNT_CREATED));
} else {
render_result_xml(array('status' => 'error', 'message' => '<p class="message error">' . ($resp->error == 'incorrect-captcha-sol' ? 'The captcha input is not correct!' : $resp->error) . '</p>'));
}
exit;
} else {
if (isset($_POST['action']) && $_POST['action'] == 'reset-password') {
BuckysUser::resetPassword($_POST['email']);
}
}
$showForgotPwdForm = isset($_GET['forgotpwd']) && $_GET['forgotpwd'];
buckys_enqueue_stylesheet('register.css');
buckys_enqueue_javascript('register.js');
$BUCKYS_GLOBALS['content'] = 'register';
$BUCKYS_GLOBALS['title'] = 'Register - BuckysRoom';
require DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php";