0
votes

I'm developing a plugin which creates specific system with specific functionality for users, who can register through that system. First I thought of creating separate users table and login/register system apart from WP built in users and login/register. But then looked at WooCommerce plugin (just as example) and found out that they are using WP built in user management for shopping accounts, which I thought is more flexible as there is already an abstraction for it and management is fairly easy. But to note, users registered through my plugin will have nothing to do with WP admin dashboard, and the system will have own pages for administrating stuff related to that plugin. So is it worth of creating own user management system, separate from WP built in, or after all use the latter?

1

1 Answers

0
votes

You can use it quite safely if you restrict user's capabilities. Also for more convenience just redirect them from admin panel to home page (in case they try to go to admin panel). You can use something like this code for that purposes:

add_action( 'admin_init', 'bs_restrict_admin_with_redirect', 1 );
function bs_restrict_admin_with_redirect() {

    if ( ! current_user_can( 'manage_options' ) && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
        wp_redirect( site_url() ); 
        exit;
    }
}

As for admin bar, just hide it within your theme.