• Resolved Bobby

    (@redreader)


    We need the option to reset a “denied” user to pending…
    Unfortunately, the admin of our little neighborhood association denies a user registration request because we haven’t heard back from the user with the information we need to verify their residency in in our neighborhood. The new user claims never to have received the email with the verification instructions.

    So, we need a way (perhaps by adding a 2nd button for “Pending” after the “Approved” button in the “Denied Users” list?) to set a Denied status back to Pending which we assume would trigger an action to resend the pending email message here (from “new_user_approve.php”):


    >>


    ? ? ? } else {

    ? ? ? ? ? ? // User Registeration welcome email

    ? ? ? ? ? ? $disable = apply_filters('nua_disable_welcome_email',false, $user_id);

    ? ? ? ? ? ? if(false===$disable) {

    ? ? ? ? ? ? ? ? $message = nua_default_registeration_welcome_email();

    ? ? ? ? ? ? ? ? $message = apply_filters( 'new_user_approve_welcome_user_message', $message, $user_email );

    ? ? ? ? ? ? ? ? $subject = sprintf( __( 'Your registration is pending for approval - [%s]', 'new-user-approve' ), get_option( 'blogname' ) );

    ? ? ? ? ? ? ? ? $subject = apply_filters( 'new_user_approve_welcome_user_subject', $subject );

    ? ? ? ? ? ? ? ? wp_mail(

    ? ? ? ? ? ? ? ? $user_email,

    ? ? ? ? ? ? ? ? $subject,

    ? ? ? ? ? ? ? ? $message,

    ? ? ? ? ? ? ? ? $this->email_message_headers()

    ? ? ? ? ? ? ? );

    ? ? ? ? ? ? }

    ? ? ? ? }


    <<
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @redreader,

    Thanks for contacting us,

    I hope you are doing well, We’ve informed our technical team about your issue, and they will work on it promptly. When we receive their response, we will get back to you. Our team is here to assist you.

    Thanks & Regards
    WP Experts Support Team

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @redreader,

    We are sending you the code to change the user status to pending, please add this code to the functions.php of the active theme.

    Note: You should add the user IDs in the array brackets by separating with comma(,) like this $user_ids = array( 22, 44, 59); // so on …

    Here is the code:

    if( class_exists( 'pw_new_user_approve' ) ) {

    add_action('admin_init', 'nua_change_status_to_pending');

    function nua_change_status_to_pending () {

    $users_id = array( 5, 6 ); // add the ids of users in array you want to back to pending.

    foreach( $users_id as $user_id ) {
    $user = get_userdata( $user_id );
    $user_status = get_user_meta($user_id, 'pw_user_status', true);
    if ( $user === false || $user_status == 'pending' ) { continue;}
    pw_new_user_approve()->add_user_status( $user_id );

    }
    }
    }


    If you have any questions, feel free to reach out. We’re here to assist you.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.