PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
PHPDS_login Class Reference
Inheritance diagram for PHPDS_login:
PHPDS_dependant iBaseLogin StandardLogin

Public Member Functions

 lookupCookieLogin ($cookie)
 selectUserFromCookie ($cookie)
 selectCookie ($id_crypt)
 setUserCookie ($user_id)
 deleteCookie ($cookie_id)
 clearUserCookie ($user_id)
 loginForm ($return=false)
 controlLogin ()
 processLogin ($username, $password)
 lookupUser ($username, $password= '')
 setLogin ($select_user_array, $persistent=false)
 clearLogin ($set_guest=true)
 setGuest ()
 isLoggedIn ()

Detailed Description

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

Member Function Documentation

clearLogin ( set_guest = true)

Destroys login session data.

Author:
Jason Schoeman

Implements iBaseLogin.

clearUserCookie ( user_id)

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

Returns:
boolean
Date:
20100702 (v1.0.0) (ross) created function
Version:
1.0.0
Author:
ross
controlLogin ( )

Check what to do with login action.

1.0.0

Date:
2011-06-20
Author:
Jason Schoeman

Implements iBaseLogin.

deleteCookie ( cookie_id)

Delete cookie from database.

Parameters:
int$cookie_id
isLoggedIn ( )

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

Returns:
boolean

Implements iBaseLogin.

loginForm ( return = false)

Loads the username & password html template form.

Parameters:
boolean$return

Implements iBaseLogin.

Reimplemented in StandardLogin.

lookupCookieLogin ( cookie)

Search the database for the given credentials from a persistent cookie

Parameters:
string$cookie
Returns:
array or false the user record
Date:
20100702 (v1.0.0) (ross) created from the lookup_user fct by jason and greg
Version:
1.0.0
Author:
jason, greg, ross
lookupUser ( username,
password = '' 
)

Search the database for the given credentials

Parameters:
string$username
string$password
Returns:
array or false the user record
Date:
20100204 (v1.0) (greg) created from Jason's original fct
20100608 (v1.0.1) (greg) moved to query system
Version:
1.0.1
Author:
jason, greg

Implements iBaseLogin.

Reimplemented in StandardLogin.

processLogin ( username,
password 
)

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

Parameters:
string$username
string$password
Returns:
boolean

Implements iBaseLogin.

Reimplemented in StandardLogin.

selectCookie ( id_crypt)

Select cookie data by providing cookie crypt key.

Parameters:
varchar$id_crypt
Returns:
array
selectUserFromCookie ( cookie)

Selects user details from provided cookie.

Parameters:
varchar$cookie
Returns:
array
setGuest ( )

Sets all settings to guest account.

Date:
20100608 (v1.0.1) (greg) moved to query system
Returns:
string
Author:
Jason Schoeman, greg

Implements iBaseLogin.

setLogin ( select_user_array,
persistent = false 
)

Make the given user the logged in user

Parameters:
array$select_user_array
Returns:
nothing
Date:
20100204 greg: created from Jason's original fct
Version:
1.0
Author:
jason, greg

Implements iBaseLogin.

setUserCookie ( user_id)

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

Parameters:
int$user_id
Returns:
array or false the user record
Date:
20100702 (v1.0.0) (ross) created function
Version:
1.0.0
Author:
ross

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations