Remove admin bar links in wordpress

You may add this code in your functions.php file in order to remove links from the admin bar of your wordpress installation according to the id of the current user. Here we check whether the id of the current user is 4.