• Resolved muneebkiani

    (@muneebkiani)


    Hi,
    The new user notification email (to admin) is not being sent. (i am using wp_insert_user for user addition on front end).

    I tried to narrow down the issue, and somehow $emails array is empty. in the following function, class-bnfw-engine.php
    public function send_notification( $setting, $id ) {}

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter muneebkiani

    (@muneebkiani)

    neverminded, the issue was within my code,
    I had updated the meta query using:
    add_action('pre_get_users', 'modify_user_list');

    and the meta values were overriding the wp user query in the following function

        private function get_emails_from_id( $user_ids ) {
            $email_list = array();
            if ( is_array( $user_ids ) && count( $user_ids ) > 0 ) {
    			
                $user_query = new WP_User_Query( array( 'include' => array(1) ) );
                foreach ( $user_query->results as $user ) {
                    $email_list[] = $user->user_email;
                }
            }
    
            return $email_list;
        }
    Plugin Author bnfw

    (@voltronik)

    Hi @muneebkiani,
    Glad you got it working in the end ??

    Any other issues, please feel free to start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘New User Registration (Admin)’ is closed to new replies.