$user->ID, 'user_pass' => $password_2, ) ); if ( $update_user ) { ?>

ID, '_atbdp_recovery_key', true ); if ( $key === $db_key ) { do_action( 'directorist_before_reset_password_form' ); ?>

admin_url( 'admin-ajax.php' ), 'redirect_url' => $redirection ? $redirection : ATBDP_Permalink::get_dashboard_page_link(), 'loading_message' => esc_html__( 'Sending user info, please wait...', 'best-listing' ), 'login_error_message' => esc_html__( 'Wrong username or password.', 'best-listing' ), ); wp_localize_script( 'directorist-main-script', 'ajax_login_object', $data ); $log_username = get_directorist_option( 'log_username', __( 'Username or Email Address', 'best-listing' ) ); $log_password = get_directorist_option( 'log_password', __( 'Password', 'best-listing' ) ); $display_rememberMe = get_directorist_option( 'display_rememberme', 1 ); $log_rememberMe = get_directorist_option( 'log_rememberme', __( 'Remember Me', 'best-listing' ) ); $log_button = get_directorist_option( 'log_button', __( 'Log In', 'best-listing' ) ); $display_recpass = get_directorist_option( 'display_recpass', 1 ); $recpass_text = get_directorist_option( 'recpass_text', __( 'Forgot Password', 'best-listing' ) ); $recpass_desc = get_directorist_option( 'recpass_desc', __( 'Lost your password? Please enter your email address. You will receive a link to create a new password via email.', 'best-listing' ) ); $recpass_username = get_directorist_option( 'recpass_username', __( 'E-mail:', 'best-listing' ) ); $recpass_placeholder = get_directorist_option( 'recpass_placeholder', __( 'eg. mail@example.com', 'best-listing' ) ); $recpass_button = get_directorist_option( 'recpass_button', __( 'Get New Password', 'best-listing' ) ); $reg_text = get_directorist_option( 'reg_text', __( "Don't have an account?", 'best-listing' ) ); $reg_url = ATBDP_Permalink::get_registration_page_link(); $reg_linktxt = get_directorist_option( 'reg_linktxt', __( 'Sign Up', 'best-listing' ) ); $display_signup = get_directorist_option( 'display_signup', 1 ); ?>

%s

', 'best-listing' ), " " . __( $recpass_text, 'best-listing' ) . '' ); } ?>

ID, '_atbdp_recovery_key', $random_password ); // if update user return true then lets send user an email containing the new password if ( $update_user ) { $subject = esc_html__( 'Password Reset Request', 'best-listing' ); // $message = esc_html__('Your new password is: ', 'best-listing') . $random_password; $site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); $message = __( 'Someone has requested a password reset for the following account:', 'best-listing' ) . '
'; /* translators: %s: site name */ $message .= sprintf( __( 'Site Name: %s', 'best-listing' ), $site_name ) . '
'; /* translators: %s: user login */ $message .= sprintf( __( 'User: %s', 'best-listing' ), $user->user_login ) . '
'; $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.', 'best-listing' ) . '
'; $message .= __( 'To reset your password, visit the following address:', 'best-listing' ) . '
'; $link = array( 'key' => $random_password, 'user' => $email, ); $message .= '' . esc_url( add_query_arg( $link, ATBDP_Permalink::get_login_page_url() ) ) . ''; $message = atbdp_email_html( $subject, $message ); $headers[] = 'Content-Type: text/html; charset=UTF-8'; $mail = wp_mail( $email, $subject, $message, $headers ); if ( $mail ) { $success = __( 'A password reset email has been sent to the email address on file for your account, but may take several minutes to show up in your inbox.', 'best-listing' ); } else { $error = __( 'Password updated! But something went wrong sending email.', 'best-listing' ); } } else { $error = __( 'Oops something went wrong updating your account.', 'best-listing' ); } } if ( ! empty( $error ) ) { echo '

' . __( 'ERROR:', 'best-listing' ) . ' ' . $error . '

'; } if ( ! empty( $success ) ) { echo '

' . $success . '

'; } } ?>