php - WordPress User System -


i'm developing plugin creates specific system specific functionality users, can register through system. first thought of creating separate users table , login/register system apart wp built in users , login/register. looked @ woocommerce plugin (just example) , found out using wp built in user management shopping accounts, thought more flexible there abstraction , management easy. note, users registered through plugin have nothing wp admin dashboard, , system have own pages administrating stuff related plugin. worth of creating own user management system, separate wp built in, or after use latter?

you can use quite safely if restrict user's capabilities. more convenience redirect them admin panel home page (in case try go admin panel). can use code 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 admin bar, hide within theme.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -