Hi @den1sa
You can set it in the wp-admin>Ultimate Member> Member Directories> Edit Member Directory> Sorting. It currently doesn’t have an option to display users requiring approval (Pending Review). I suggest you select “new users first” or “not verified accounts first”
https://screenbud.com/s/m1837L9gANg
Thread Starter
den1sa
(@den1sa)
Thank you. But will it be so that if i approve a user that is in-between multiple pending review users, i will then get the following?
pending review
pending review
approved
pending review
pending review
pending review
approved
approved
approved…
I dont see the option for Not verified accounts first.
-
This reply was modified 4 years ago by
den1sa.
Hi @den1sa
It requires a custom code, you can try and use the sample code in the URL below:
https://gist.github.com/AngeliMae/40afbf53fd747039adf489b71b0104d1
Install the code snippet into your child theme’s functions.php file
or use the “Code Snippets” Plugin and paste the sample code.
-
This reply was modified 4 years ago by
gelieys.
-
This reply was modified 4 years ago by
gelieys.
-
This reply was modified 4 years ago by
gelieys.
Thread Starter
den1sa
(@den1sa)
Brilliant. Worked perfectly.
Thank you. 🙂
Thread Starter
den1sa
(@den1sa)
Can i be cheeky and ask if the users can be sorted by ‘status and date registered (dsc)’, so that ‘Review Pending’ are listed first followed by ‘Approved’, and all have a secondary sort by date registered in descending order so the newest registrations appear first?
Hi @den1sa
Please try the following code snippet:
add_action("um_user_before_query","um_052422_orderby_profile_photo", 999999999, 2 );
function um_052422_orderby_profile_photo( $query_args, $obj ) {
$obj->query_args['meta_query'][ ] = array(
'relation' => 'OR',
'wxo_featured_clause' => array(
'key' => 'account_status',
'compare' => 'awaiting_admin_review'
),
array(
"key" => 'account_status',
),
);
$obj->query_args['orderby'] = array(
'wxo_featured_clause' => 'DESC',
'user_registered' => 'DESC',
);
}
Regards,
Thread Starter
den1sa
(@den1sa)
Perfect. It works. Thank you so very much.
-
This reply was modified 4 years ago by
den1sa.
Thanks for letting us know.