• Resolved muneebkiani

    (@muneebkiani)


    Hi,
    i am creating new users on front end using wp_insert_user, also on success i call the following action.
    wp_new_user_notification( $user_id, null, ‘both’ ); new user get notification email as expected but there is no notification email to admin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @muneebkiani,
    Thanks for your message.

    Can you confirm that the new user notification you’re receiving is the one from BNFW and not the default one from WordPress?

    Thread Starter muneebkiani

    (@muneebkiani)

    yes they are from bnfw, for new users is fine but somehow admin is not receiving any notification. al

    Thread Starter muneebkiani

    (@muneebkiani)

    also if i create a new user from back end both admin and user get a notification so problem seems to be only with creating new user on front end

    $WP_array = array (
    					'first_name'    =>  $first_name,
    					'last_name'     =>  $last_name,
    					'user_login'    =>  sanitize_user($username, true ),
    					'user_email'    =>  $email,
    					'user_pass'     =>  $password,
    					'role'			=>  $role, 
    					) ;
    		$user_id = wp_insert_user( $WP_array ) ;
    
    		// On success.
    		if ( ! is_wp_error( $user_id ) ) {
    			$error = __("<span class='error-message success'>Benutzer erstellt.</span>", "pixel_framework");
    			wp_new_user_notification( $user_id, null, 'both' );
    		}else{
    			$error .= "<p class='error-message'>Try Again.</p>";
    		}
    • This reply was modified 7 months, 3 weeks ago by muneebkiani.
    • This reply was modified 7 months, 3 weeks ago by muneebkiani.
    Plugin Author bnfw

    (@voltronik)

    Hi @muneebkiani,
    I couldn’t say for sure but it sounds like you might be missing something from your front-end code. If you are able to trigger the notification successfully, then it does mean that BNFW is working, there’s just something preventing it from sending all notifications from the front end. I’d be unable to help with custom code unfortunately, but i’d look there.

    Thread Starter muneebkiani

    (@muneebkiani)

    Thanks for the reply I will try to dig deeper, the code I am working with to add new users is the pretty standard one. Following are the settings that i have in the backend
    https://snipboard.io/hp2Qog.jpg

    Thread Starter muneebkiani

    (@muneebkiani)

    I figured out the issue, new user registration to admin email doesn’t work with the plugin.

    • This reply was modified 7 months, 3 weeks ago by muneebkiani.
    • This reply was modified 7 months, 3 weeks ago by muneebkiani.
    Plugin Author bnfw

    (@voltronik)

    Hi @muneebkiani,
    Do you mean you can’t get the notification to work in the plugin at all? Even if you create a user in the WordPress Admin?

    Thread Starter muneebkiani

    (@muneebkiani)

    with wordpress admin it works fine, but if I create from the frontend and I have enabled this option to send notification via plugin, it doesn’t work.
    if I remove admin notification in bnfw, default wp notification (to admin upon new user creation) works fine.

    Plugin Author bnfw

    (@voltronik)

    Hi @muneebkiani,
    Hmm, it still sounds like something a conflict or an issue with custom code.
    I can’t say for sure though as your implementation is bespoke.
    Another plugin that has this functionality might work better for you in terms of compatibility.

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