New User Registration – For User not working when user added manually
-
Hi. Somehow, the email goes if i add user via the front end users tab in dashboard. but it doesnt send when i add a user from backend, (with functions.php)
This is what I used in functions.php
function fb_wp_insert_user() { $user_data = array( 'ID' => '', 'user_pass' => wp_generate_password(), 'user_login' => 'dummy', 'user_nicename' => 'Dummy', 'user_url' => '', 'user_email' => '[email protected]', 'display_name' => 'Dummy', 'nickname' => 'dummy', 'first_name' => 'Dummy', 'user_registered' => '2010-05-15 05:55:55', 'role' => get_option('default_role') // Use default role or another role, e.g. 'editor' ); $user_id = wp_insert_user( $user_data ); } add_action( 'admin_init', 'fb_wp_insert_user' );
Am I doing something wrong?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘New User Registration – For User not working when user added manually’ is closed to new replies.