From: Ivan Kohler Date: Tue, 5 Dec 2017 19:43:54 +0000 (-0800) Subject: add forgot password functionality to example wordpress self-service, RT#75279 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=57afdbf3133a56a593fe20fe596f424b3724bd3e add forgot password functionality to example wordpress self-service, RT#75279 --- diff --git a/fs_selfservice/wordpress/forgot_password.php b/fs_selfservice/wordpress/forgot_password.php new file mode 100644 index 000000000..66e440fc0 --- /dev/null +++ b/fs_selfservice/wordpress/forgot_password.php @@ -0,0 +1,43 @@ +reset_passwd(array( + 'email' => $_POST['email'], + )); + + if ( $result['error'] ) { + $_REQUEST['freeside_error'] = $result['error']; + } else { + $sent = 1; + } + +} + +?> + + + + A verification email has been sent to your mailbox. Please follow the + link in your email to complete your password reset. + + + +Please enter your email address. A password reset email will be sent to that +address

+ + + +
+
+ +
+ + + + diff --git a/fs_selfservice/wordpress/process_forgot_password.php b/fs_selfservice/wordpress/process_forgot_password.php new file mode 100644 index 000000000..a006d2079 --- /dev/null +++ b/fs_selfservice/wordpress/process_forgot_password.php @@ -0,0 +1,57 @@ +process_reset_passwd(array( + 'session_id' => $_POST['freeside_session_id'], + 'new_password' => $_POST['new_password'], + 'new_password2' => $_POST['new_password2'], + )); + + if ( $result['error'] ) { + $_REQUEST['freeside_error'] = $result['error']; + $freeside_session_id = htmlspecialchars($_POST['freeside_session_id']); + } + +?> + + + + + + Your password has been changed. You can now log in. + + + + + + + + +
+ + New password:
+ + Re-enter new password:
+ + +
+ + +