Make sure the user id we're checking for is an int.
Check to make sure it's not empty before array_shift'ing.