User Guide | User Login Functions

The flexi auth library uses browser sessions and cookies in conjunction with a session management table within the database to handle user logins.

Below is a compiled list of functions and configuration settings to customise how users can authenticate their login credentials.

Users : User Guide Index

Login Session/Cookie Config | Login reCAPTCHA Config | Login Functions | Login CAPTCHA Functions

Login Configuration Settings

Customise the configuration of how the auth library handles login sessions and CAPTCHA settings.

Login Functions

The libraries core login and logout functions.
  • login()
    Verifies a users identity and password, if valid, they are logged in.
  • logout()
    Logs a user out of their current session or all sessions.

Login CAPTCHA Functions

CAPTCHA functions to aid login verification.
  • recaptcha()
    Generates the html for Google reCAPTCHA.
  • validate_recaptcha()
    Validates if a Google reCAPTCHA answer is correct.
  • math_captcha()
    Generates a math captcha question and answer.
  • validate_math_captcha()
    Validates if a math captcha answer is correct.
  • ip_login_attempts_exceeded()
    Validates whether the number of failed login attempts from a unique IP address has exceeded a defined limit.
    Typically used in conjunction with showing a captcha for users repeatedly failing login attempts.