Check for root access in a bash script

Just something handy to put in your script if you need to check for root access:

# Do we have root access?
if [[ $(/usr/bin/id -u) -ne 0 ]];
    then echo "Sorry, this script needs to run with root or sudo access"
    exit
fi