Reply To: Different user capability for Verify Users admin page

Home Forums Pie-Register 2.0 Support Different user capability for Verify Users admin page Reply To: Different user capability for Verify Users admin page

#4597

Joe Hoffman
Participant

Thank you for that code start. Since I didn’t want to change the functionality for all of the admin page, just the Unverified page, here’s what I ended up with:

add_action('admin_menu','pr_custom_admin_menu');
function pr_custom_admin_menu(){
    global $pie_register;
    $pie_page_verify = add_users_page( 'Unverified Users', 'Unverified Users', 'edit_users', 'unverified-users2', array($pie_register, 'Unverified') );
                add_action('admin_print_scripts-' . $pie_page_verify, array($pie_register,'pieregister_admin_scripts_styles'));
}

This way, I can add just the Users: Unverified page only for users of a certain capability (in this case, edit_users) that I have assigned to a new user role.

Thanks for a great plug-in. Looking forward to its continued development.