Class PHPDS_login

Description

Implements interfaces:

This base class implements the fundations for an authentification plugin It doesn't actually provides authentification (it will reject any request) but provides structure, cookie support ("remember me") and writing to the system log

Note: it doesn't in any deal with template or GUI, the auth plugin must do that

  • author: Jason Schoeman
  • version: 1.0.2 (greg)

Located in /PHPDS_login.class.php (line 91)

PHPDS_dependant
   |
   --PHPDS_login
Method Summary
void clearLogin ([ $set_guest = true])
boolean clearUserCookie ( $user_id)
void controlLogin ()
void deleteCookie (int $cookie_id)
boolean isLoggedIn ()
void loginForm ([boolean $return = false])
array lookupCookieLogin (string $cookie)
array lookupUser (string $username, [string $password = ''])
boolean processLogin (string $username, string $password)
array selectCookie (varchar $id_crypt)
array selectUserFromCookie (varchar $cookie)
string setGuest ()
nothing setLogin (array $select_user_array, [ $persistent = false])
array setUserCookie (int $user_id)
Variables
Methods
clearLogin (line 346)

Destroys login session data.

  • author: Jason Schoeman
  • access: public
void clearLogin ([ $set_guest = true])
  • $set_guest

Implementation of:
iBaseLogin::clearLogin()
Destroys login session data.
clearUserCookie (line 194)

Delete the current persistent cookie from the db and kill the cookie on the user end.

  • author: ross
  • version: 1.0.0
  • date: 20100702 (v1.0.0) (ross) created function
  • access: public
boolean clearUserCookie ( $user_id)
  • $user_id
controlLogin (line 216)

Check what to do with login action.

  • author: Jason Schoeman
  • date: 2011-06-20
  • access: public
void controlLogin ()

Implementation of:
iBaseLogin::controlLogin()
Check what to do with login action.
deleteCookie (line 181)

Delete cookie from database.

  • access: public
void deleteCookie (int $cookie_id)
  • int $cookie_id
isLoggedIn (line 422)

Check is user is logged in, return false if not.

  • access: public
boolean isLoggedIn ()

Implementation of:
iBaseLogin::isLoggedIn()
Check is user is logged in, return false if not.
loginForm (line 204)

Loads the username & password html template form.

  • access: public
void loginForm ([boolean $return = false])
  • boolean $return

Implementation of:
iBaseLogin::loginForm()
Loads the username & password html template form.
lookupCookieLogin (line 103)

Search the database for the given credentials from a persistent cookie

  • return: or false the user record
  • author: jason, greg, ross
  • version: 1.0.0
  • date: 20100702 (v1.0.0) (ross) created from the lookup_user fct by jason and greg
  • access: public
array lookupCookieLogin (string $cookie)
  • string $cookie
lookupUser (line 260)

Search the database for the given credentials

  • return: or false the user record
  • author: jason, greg
  • version: 1.0.1
  • date: 20100608 (v1.0.1) (greg) moved to query system
  • date: 20100204 (v1.0) (greg) created from Jason's original fct
  • access: public
array lookupUser (string $username, [string $password = ''])
  • string $username
  • string $password

Implementation of:
iBaseLogin::lookupUser()
Search the database for the given credentials
processLogin (line 244)

Checks to see if user and password is correct and allowed. Then creates session data accordingly.

  • access: public
boolean processLogin (string $username, string $password)
  • string $username
  • string $password

Implementation of:
iBaseLogin::processLogin()
Checks to see if user and password is correct and allowed. Then creates session data accordingly.
selectCookie (line 157)

Select cookie data by providing cookie crypt key.

  • access: public
array selectCookie (varchar $id_crypt)
  • varchar $id_crypt
selectUserFromCookie (line 146)

Selects user details from provided cookie.

  • access: public
array selectUserFromCookie (varchar $cookie)
  • varchar $cookie
setGuest (line 383)

Sets all settings to guest account.

  • author: Jason Schoeman, greg
  • date: 20100608 (v1.0.1) (greg) moved to query system
  • access: public
string setGuest ()

Implementation of:
iBaseLogin::setGuest()
Sets all settings to guest account.
setLogin (line 274)

Make the given user the logged in user

  • author: jason, greg
  • version: 1.0
  • date: 20100204 greg: created from Jason's original fct
  • access: public
nothing setLogin (array $select_user_array, [ $persistent = false])
  • array $select_user_array
  • $persistent

Implementation of:
iBaseLogin::setLogin()
Make the given user the logged in user
setUserCookie (line 171)

Set a persistent cookie to be used as a remember me function

  • return: or false the user record
  • author: ross
  • version: 1.0.0
  • date: 20100702 (v1.0.0) (ross) created function
  • access: public
array setUserCookie (int $user_id)
  • int $user_id

Inherited Methods

Inherited From PHPDS_dependant

PHPDS_dependant::__construct()
PHPDS_dependant::construct()
PHPDS_dependant::debugInstance()
PHPDS_dependant::factory()
PHPDS_dependant::factoryWith()
PHPDS_dependant::info()
PHPDS_dependant::log()
PHPDS_dependant::PHPDS_dependance()
PHPDS_dependant::_log()
PHPDS_dependant::__call()
PHPDS_dependant::__get()
PHPDS_dependant::__set()

Documentation generated on Tue, 09 Aug 2011 09:05:12 +0200 by phpDocumentor 1.4.3