diff options
Diffstat (limited to 'fs_selfservice/wordpress/forgot_password.php')
-rw-r--r-- | fs_selfservice/wordpress/forgot_password.php | 43 |
1 files changed, 43 insertions, 0 deletions
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 @@ +<?php + +require( dirname( __FILE__ ) . '/wp-blog-header.php' ); +get_header(); + +$freeside = new FreesideSelfService(); + +if ( isset($_POST['email']) ) { + + $result = $freeside->reset_passwd(array( + 'email' => $_POST['email'], + )); + + if ( $result['error'] ) { + $_REQUEST['freeside_error'] = $result['error']; + } else { + $sent = 1; + } + +} + +?> + +<?php if ( $sent == 1 ) { ?> + + A verification email has been sent to your mailbox. Please follow the + link in your email to complete your password reset. + +<?php } else { ?> + +Please enter your email address. A password reset email will be sent to that +address<BR><BR> + +<?php include('elements/error.php'); ?> + +<FORM METHOD="POST"> +<INPUT TYPE="text" NAME="email" VALUE=""><BR> +<INPUT TYPE="submit" VALUE="Send reset email"> +</FORM> + +<?php } ?> + +<?php get_footer(); ?> |