QVCI Library 3.2
 All Classes Namespaces Functions
Public Member Functions | Public Attributes | List of all members
Authuser Class Reference

Public Member Functions

 __construct ()
 
 init ()
 
 login ($username, $password, $persistent=false, $registration=false)
 
 logout ()
 
 switch_user ($uid)
 

Public Attributes

const LOGIN_SUCCESS = 0
 
const LOGIN_USER_NOT_FOUND = 1
 
const LOGIN_BAD_PASSWORD = 2
 
const LOGIN_USER_NOT_VALID = 3
 

Detailed Description

Authuser class

Handles user authorization

Constructor & Destructor Documentation

Authuser::__construct ( )

Constructor

Member Function Documentation

Authuser::init ( )

Initialization function. This function is called by the post_controller_constructor hook. It will set up the auth user data and perform autologin.

Authuser::login (   $username,
  $password,
  $persistent = false,
  $registration = false 
)

Process the login form POST.

Parameters
string$username
string$password
bool$persistent
bool$registrationFlag to indicate registration mode
Authuser::logout ( )

Perform user logout.

Authuser::switch_user (   $uid)

Change to a different user (if the real user has permission)

Parameters
int$uid

The documentation for this class was generated from the following file: