you can use add role hook of wordpress to add new role:
$user = new WP_User( $user_id );
$user->add_cap( $staudent);
$user->remove_cap( 'professors');
No comments:
Post a Comment