Skip to content

Instantly share code, notes, and snippets.

@Akii
Created June 4, 2014 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akii/d8bf20f9b4d764499aa1 to your computer and use it in GitHub Desktop.
Save Akii/d8bf20f9b4d764499aa1 to your computer and use it in GitHub Desktop.
/**
* Authenticate a user (Check various conditions for the user that might invalidate its authentication, eg. password match, domain, IP, etc.)
*
* @param array $user Data of user.
*
* @return integer >= 200: User authenticated successfully.
* No more checking is needed by other auth services.
* >= 100: User not authenticated; this service is not responsible.
* Other auth services will be asked.
* > 0: User authenticated successfully.
* Other auth services will still be asked.
* <= 0: Authentication failed, no more checking needed
* by other auth services.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment