how to create user programmatically with unapproved status
-
hello,
im using these line of codes to create user programmatically but it seems like i cannot change the user status to pending or un approved!
$NewUser = wp_insert_user( array( 'user_login' => $UserName, 'user_pass' => wp_generate_password( 10, true, true ), 'user_email' => $UserEmail, 'role' => 'test', ) ); update_user_meta( $NewUser, 'currency', $UserItem['custName'] ); update_user_meta( $NewUser, 'wppb_approval_status', 'unapproved' );
i appreciate it if you guys can give me a hint on how can i create user and set the status on pending or unapproved ?!
Thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to create user programmatically with unapproved status’ is closed to new replies.