3 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
6 $freeside = new FreesideSelfService();
8 if ( isset($_POST['freeside_session_id']) ) {
10 $result = $freeside->process_reset_passwd(array(
11 'session_id' => $_POST['freeside_session_id'],
12 'new_password' => $_POST['new_password'],
13 'new_password2' => $_POST['new_password2'],
16 if ( $result['error'] ) {
17 $_REQUEST['freeside_error'] = $result['error'];
18 $freeside_session_id = htmlspecialchars($_POST['freeside_session_id']);
23 <?php include('elements/error.php'); ?>
25 <?php if ( ! $result['error'] ) { ?>
27 Your password has been changed. You can now <A HREF="example_login.php">log in</A>.
29 <?php get_footer(); die; ?>
33 } elseif ( isset($_GET['action']) ) {
35 $freeside_session_id = '';
37 if ( preg_match( '/^process_forgot_password_session_(\w+)$/', $_GET['action'], $matches ) ) {
38 $freeside_session_id = $matches[1];
40 #shouldn't be at this URL w/o action; accidentally edited URL or malicious
48 <INPUT TYPE="hidden" NAME="freeside_session_id" VALUE="<?php echo $freeside_session_id; ?>">
49 New password: <INPUT TYPE="password" NAME="new_password"><BR>
51 Re-enter new password: <INPUT TYPE="password" NAME="new_password2"><BR>
53 <INPUT TYPE="submit" VALUE="Change password">
57 <?php get_footer(); ?>