LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Class: LiveUser_Auth_PDO

Source Location: /LiveUser-0.16.14/LiveUser/Auth/PDO.php

Class Overview

LiveUser_Auth_Common
   |
   --LiveUser_Auth_PDO

PDO container for Authentication. This is a PHP5 only driver.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Markus Wolff

Variables

Methods


Inherited Variables

Inherited Methods

Class: LiveUser_Auth_Common

LiveUser_Auth_Common::LiveUser_Auth_Common()
Class constructor. Feel free to override in backend subclasses.
LiveUser_Auth_Common::decryptPW()
Decrypts a password so that it can be compared with the user input.
LiveUser_Auth_Common::disconnect()
properly disconnect from resources
LiveUser_Auth_Common::encryptPW()
Encrypts a password for storage in a backend container.
LiveUser_Auth_Common::externalValuesMatch()
Check if the stored external values match the current external values
LiveUser_Auth_Common::freeze()
store all properties in an array
LiveUser_Auth_Common::getProperty()
Function returns the inquired value if it exists in the class.
LiveUser_Auth_Common::init()
Load the storage container
LiveUser_Auth_Common::login()
Tries to make a login with the given handle and password.
LiveUser_Auth_Common::readUserData()
Reads user data from the given data source If only $handle is given, it will read the data from the first user with that handle and return true on success.
LiveUser_Auth_Common::setExternalValues()
Creates associative array of values from $externalValues['values'] with $keysToCheck
LiveUser_Auth_Common::unfreeze()
Reinitializes properties

Class Details

[line 72]
PDO container for Authentication. This is a PHP5 only driver.

This is a PDO backend driver for the LiveUser class.

Requirements:

  • PHP 5
  • File "LiveUser.php" (contains the parent class "LiveUser")
  • Array of connection options passed to the constructor. Example: array('dsn' => 'mysql:host:localhost;dbname=db_name', 'options' => array('username' => 'root', 'password' => 'secret', 'attr' => array()));



[ Top ]


Class Variables

$prefix =  'liveuser_'

[line 105]

Table prefix Prefix for all db tables the container has.
  • Access: public

Type:   string


[ Top ]



Method Detail

disconnect   [line 305]

bool disconnect( )

properly disconnect from database
  • Return: true on success or false on failure
  • Access: public

Overrides LiveUser_Auth_Common::disconnect() (properly disconnect from resources)
[ Top ]

init   [line 124]

bool init( array &$conf, string $containerName)

Load the storage container
  • Return: true on success or false on failure
  • Access: public

Overrides LiveUser_Auth_Common::init() (Load the storage container)

Parameters:

array   &$conf     array containing the configuration.
string   $containerName     name of the container that should be used

[ Top ]

readUserData   [line 220]

bool readUserData( [string $handle = ''], [string $passwd = ''], [bool|int $auth_user_id = false])

Reads user data from the given data source If only $handle is given, it will read the data from the first user with that handle and return true on success.

If $handle and $passwd are given, it will try to find the first user with both handle and password matching and return true on success (this allows multiple users having the same handle but different passwords - yep, some people want this). if only an auth_user_id is passed it will try to read the data based on the id If no match is found, false is being returned.

  • Return: true on success or false on failure
  • Access: public

Overrides LiveUser_Auth_Common::readUserData() (Reads user data from the given data source If only $handle is given, it will read the data from the first user with that handle and return true on success.)

Parameters:

string   $handle     user handle
string   $passwd     user password
bool|int   $auth_user_id     if the user data should be read using the auth user id

[ Top ]


Documentation generated on Fri, 15 Oct 2010 15:00:14 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.