@candidek
it seems from your documentation that imported users always need to be approved
What will happen if you try to login as one of the imported users?
The imported users are “pending review” when imported through a plugin… they then have to be manually approved
@candidek
This code snippet will auto-approve the user at first login if current status is awaiting_admin_review.
add_filter( 'authenticate', 'my_submit_form_login_approval', 49, 3 );
function my_submit_form_login_approval( $user, $username, $password ) {
if ( isset( $user->ID ) ) {
um_fetch_user( $user->ID );
if( um_user( 'account_status' ) == 'awaiting_admin_review' ) {
update_user_meta( $user->ID, 'account_status', 'approved' );
UM()->user()->remove_cache( $user->ID );
um_fetch_user( $user->ID );
}
}
return $user;
}
Add the code snippet to your child-theme’s functions.php file or
use the “Code Snippets” Plugin:
https://ww.wp.xz.cn/plugins/code-snippets/
Thanks @missveronicatv – that’s a very helpful code snippet though ideally I prefer a root fix as we have two membership types and only one is auto-approved and the second requires an admin to review manually. The auto-approve works when we create individual new user accounts but it’s the import that has the limitation…
Thanks!
@candidek
You should ask the Import Plugin Developer to make the User approved instead of setting acount_status to awaiting_admin_review.
Hey there!
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,