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

Class: LiveUser_Admin_Auth_Common

Source Location: /LiveUser_Admin-0.4.0/Auth/Common.php

Class Overview


Base class for authentication backends.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Markus Wolff

Variables

Methods


Child classes:

LiveUser_Admin_Auth_DB
This is a PEAR::DB backend container driver for the LiveUser Admin auth class.
LiveUser_Admin_Auth_PDO
This is a PECL::PDO backend container driver for the LiveUser Admin auth class.
LiveUser_Admin_Auth_MDB2
This is a PEAR::MDB2 backend container driver for the LiveUser Admin auth class.
LiveUser_Admin_Auth_MDB
This is a PEAR::MDB backend container driver for the LiveUser Admin auth class.

Inherited Variables

Inherited Methods


Class Details

[line 75]
Base class for authentication backends.


[ Top ]


Class Variables

$containerName =  null

[line 142]

The name associated with this auth container. The name is used when adding users from this container to the reference table in the permission container. This way it is possible to see from which auth container the user data is coming from.
  • Access: public

Type:   string


[ Top ]

$secret =

[line 131]

Defines the secret to use for encryption if needed
  • Access: protected

Type:   string


[ Top ]

$selectable_tables = array(
        'getUsers' => array('users'),)

[line 99]

Key (method names), with array lists of selectable tables for the given method
  • Access: public

Type:   array


[ Top ]

$stack =  null

[line 83]

Error stack
  • Access: public

Type:   object PEAR_ErrorStack


[ Top ]



Method Detail

LiveUser_Admin_Auth_Common (Constructor)   [line 149]

LiveUser_Admin_Auth_Common LiveUser_Admin_Auth_Common( )

Class constructor. Feel free to override in backend subclasses.
  • Access: protected

[ Top ]

addUser   [line 229]

int|bool addUser( array $data)

Add a user
  • Return: false on error, true (or new id) on success
  • Access: public

Parameters:

array   $data     containing atleast the key-value-pairs of all required columns in the users table

[ Top ]

decryptPW   [line 201]

string decryptPW( string $encryptedPW)

Decrypts a password so that it can be compared with the user input.

Uses the algorithm defined in the passwordEncryptionMode property.

  • Return: the decrypted password
  • Access: public

Parameters:

string   $encryptedPW     the encrypted password

[ Top ]

disconnect   [line 327]

void disconnect( )

properly disconnect from resources
  • Access: public

[ Top ]

encryptPW   [line 215]

string encryptPW( string $plainPW)

Encrypts a password for storage in a backend container.

Uses the algorithm defined in the passwordEncryptionMode property.

  • Return: the encrypted password
  • Access: public

Parameters:

string   $plainPW     encryption type

[ Top ]

getUsers   [line 305]

bool|array getUsers( [array $params = array()])

Fetches users
  • Return: false on failure or array with selected data
  • Access: public

Parameters:

array   $params     containing key-value pairs for: 'fields' - ordered array containing the fields to fetch if empty all fields from the user table are fetched 'filters' - key values pairs (value may be a string or an array) 'orders' - key value pairs (values 'ASC' or 'DESC') 'rekey' - if set to true, returned array will have the first column as its first dimension 'group' - if set to true and $rekey is set to true, then all values with the same first column will be wrapped in an array 'limit' - number of rows to select 'offset' - first row to select 'select' - determines what query method to use: 'one' -> queryOne, 'row' -> queryRow, 'col' -> queryCol, 'all' ->queryAll (default) 'selectable_tables' - array list of tables that may be joined to in this query, the first element is the root table from which the joins are done

[ Top ]

init   [line 162]

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

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

Parameters:

array   &$conf     contains configuration of the container
string   $containerName     name of container

[ Top ]

removeUser   [line 273]

int|bool removeUser( array $filters)

Remove a user
  • Return: false on error, the affected rows on success
  • Access: public

Parameters:

array   $filters     key values pairs (value may be a string or an array) This will construct the WHERE clause of your update Be careful, if you leave this blank no WHERE clause will be used and all users will be affected by the update

[ Top ]

updateUser   [line 252]

int|bool updateUser( array $data, array $filters)

Update a user
  • Return: false on error, the affected rows on success
  • Access: public

Parameters:

array   $data     containing the key value pairs of columns to update
array   $filters     key values pairs (value may be a string or an array) This will construct the WHERE clause of your update Be careful, if you leave this blank no WHERE clause will be used and all users will be affected by the update

[ Top ]


Documentation generated on Tue, 05 Oct 2010 16:30:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.