If you need to hide dashboard admin bar for the non admin user you can use this code.
It don’t hide it on the frontend.
add_action('admin_head', 'hide_menu', 999);
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}