Determines if a user has a specified function.
Returns 1 if the user has the specified function otherwise 0.