duplicated admin email
-
hello
I used this code to let the logged in user can add new users while he logged in
add_filter( 'um_registration_for_loggedin_users', '__return_true' );
and use the next code to fix the un sent email to the new user and to adminadd_action("um_registration_complete","um_070221_email_notification",1); function um_070221_email_notification( $user_id ){ um_fetch_user( $user_id ); $email = um_user("user_email"); UM()->mail()->send( $email, 'welcome_email' ); $emails = um_multi_admin_email(); if ( ! empty( $emails ) ) { foreach ( $emails as $email ) { if ( um_user( 'account_status' ) != 'pending' ) { UM()->mail()->send( $email, 'notification_new_user', array( 'admin' => true ) ); } else { UM()->mail()->send( $email, 'notification_review', array( 'admin' => true ) ); } } } }
its look with new update of UM the admin email was work well and thus this code cause to duplicate the sent email to admin where he hot 2 same emails
would you please help to remove the part of sending admin email from this code
best regards
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘duplicated admin email’ is closed to new replies.