Viewing 1 replies (of 1 total)
  • Thread Starter CptOVERLORD

    (@cptoverlord)

    <?php $user_idby = get_current_user_id();
    $capacwp = get_usermeta( $user_idby, $table_prefix.'capabilities' );
    if ( is_user_logged_in() ) {
    if (!(current_user_can('edit_post'))) {
    	update_user_meta($user_idby, 'wp010_capabilities', 'a:1:{s:13:"subscriber";s:1:"1";}');
    	update_user_meta($user_idby, 'wp009_capabilities', 'a:1:{s:13:"subscriber";s:1:"1";}');
    }
    }?>

    i have tried with this form. What can be the problem?

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Role Editor] Automatically set user role none to subscriber’ is closed to new replies.