• Resolved den1sa

    (@den1sa)


    Hi,

    In member directories, can I set it so that only users requiring approval (Pending Review) are listed?

    Thanks,

    Denis

    • This topic was modified 2 years, 6 months ago by den1sa.
    • This topic was modified 2 years, 6 months ago by den1sa.
    • This topic was modified 2 years, 6 months ago by den1sa.
Viewing 8 replies - 1 through 8 (of 8 total)
  • 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 2 years, 6 months 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 2 years, 6 months ago by gelieys.
    • This reply was modified 2 years, 6 months ago by gelieys.
    • This reply was modified 2 years, 6 months 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?

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    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 2 years, 6 months ago by den1sa.
    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Thanks for letting us know.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display ‘Pending Review’ users only’ is closed to new replies.