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

Class: LiveUser_Admin_Auth_Common

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

Class Overview


Base class for authentication backends.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2005 Markus Wolff

Variables

Methods


Child classes:

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.
LiveUser_Admin_Auth_DB
This is a PEAR::DB 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 132]

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 121]

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

Type:   string


[ Top ]



Method Detail

LiveUser_Admin_Auth_Common (Constructor)   [line 139]

LiveUser_Admin_Auth_Common LiveUser_Admin_Auth_Common( )

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

[ Top ]

addUser   [line 266]

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 190]

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

Parameters:

string   $encryptedPW   —  the encrypted password

[ Top ]

disconnect   [line 358]

void disconnect( )

properly disconnect from resources
  • Access: public

[ Top ]

encryptPW   [line 226]

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

Parameters:

string   $plainPW   —  password to encrypt

[ Top ]

getUsers   [line 338]

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)

[ Top ]

init   [line 152]

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 309]

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 288]

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 Mon, 11 Mar 2019 14:36:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.