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

Class: LiveUser_Admin_Auth_Common

Source Location: /LiveUser-0.13.2/Admin/Auth/Common.php

Class Overview


Base class for authentication backends.


Author(s):

Version:

  • $Id: Common.php,v 1.24 2004/10/12 00:58:44 dufuz Exp $

Variables

Methods


Child classes:

LiveUser_Admin_Auth_Container_MDB2
Simple MDB2-based complexity driver for LiveUser.
LiveUser_Admin_Auth_Container_MDB
Simple MDB-based complexity driver for LiveUser.
LiveUser_Admin_Auth_Container_DB
Simple DB-based complexity driver for LiveUser.

Inherited Variables

Inherited Methods


Class Details

[line 27]
Base class for authentication backends.
  • Author: Lukas Smith <smith@backendmedia.com>
  • Version: $Id: Common.php,v 1.24 2004/10/12 00:58:44 dufuz Exp $


[ Top ]


Class Variables

$init_ok =  false

[line 39]

Indicates if backend module initialized correctly. If yes,

true, if not false. Backend module won't initialize if the init value (usually an object or resource handle that identifies the backend to be used) is not of the required type.

  • Access: public

Type:   boolean


[ Top ]

$name =  null

[line 71]

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 ]



Method Detail

LiveUser_Admin_Auth_Common (Constructor)   [line 78]

LiveUser_Admin_Auth_Common LiveUser_Admin_Auth_Common( &$connectOptions, [ $name = null])

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

Parameters:

   &$connectOptions   — 
   $name   — 

[ Top ]

addUser   [line 203]

mixed addUser( string $handle, [string $password = ''], [array $optionalFields = array()], [array $customFields = array()], [mixed $authId = null])

Adds a new user to Auth.
  • Return: Users auth ID on success, DB error if not, false if not initialized
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Auth_Container_MDB2::addUser()
Adds a new user to Auth/MDB2.
LiveUser_Admin_Auth_Container_MDB::addUser()
Adds a new user to Auth/MDB.
LiveUser_Admin_Auth_Container_DB::addUser()
Adds a new user to Auth/DB.

Parameters:

string   $handle   —  Handle (username).
string   $password   —  Password.
array   $optionalFields   —  Array of optional fields values to be added array('alias' => ''value')
array   $customFields   —  Array of custom fields values to be added array('alias' => ''value')
mixed   $authId   —  If specificed no new ID will be automatically generated instead

[ Top ]

decryptPW   [line 101]

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   —  password as an encrypted string

[ Top ]

encryptPW   [line 141]

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   —  password as plain text

[ Top ]

getProperty   [line 183]

mixed getProperty( string $what)

Function returns the inquired value if it exists in the class.
  • Return: null, a value or an array.
  • Access: public

Parameters:

string   $what   —  Name of the property to be returned.

[ Top ]

getUsers   [line 261]

mixed getUsers( [array $filters = array()], [string $order = null], [boolean $rekey = false])

Gets all users with handle, passwd, authId, lastlogin, is_active and individual rights.

The array will look like this:

  1.  $userData[0]['auth_user_id']       'wujha433gawefawfwfiuj2ou9823r98h';
  2.              ['handle']       'myLogin';
  3.              ['passwd']     'd346gs2gwaeiuhaeiuuweijfjuwaefhj';
  4.              ['lastlogin']    = 1254801292; (Unix timestamp)
  5.              ['is_active']     = 1; (1 = yes0 = no)

  • Return: Array with user data or DB error.
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Auth_Container_MDB2::getUsers()
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.
LiveUser_Admin_Auth_Container_MDB::getUsers()
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.
LiveUser_Admin_Auth_Container_DB::getUsers()
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.

Parameters:

array   $filters   —  filters to apply to fetched data
string   $order   —  if not null 'ORDER BY $order' will be appended to the query
boolean   $rekey   —  will return an associative array with the auth_user_id as the key by using DB::getAssoc() instead of DB::getAll()

[ Top ]

removeUser   [line 217]

mixed removeUser( string $authId)

Removes an existing user from Auth.
  • Return: True on success, error object if not.
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Auth_Container_MDB2::removeUser()
Removes an existing user from Auth/MDB2.
LiveUser_Admin_Auth_Container_MDB::removeUser()
Removes an existing user from Auth/MDB.
LiveUser_Admin_Auth_Container_DB::removeUser()
Removes an existing user from Auth/DB.

Parameters:

string   $authId   —  Auth user ID of the user that should be removed.

[ Top ]

updateUser   [line 234]

mixed updateUser( string $authId, [string $handle = ''], [string $password = ''], [array $optionalFields = array()], [array $customFields = array()])

Changes user data in auth table.
  • Return: True on success, DB error if not.
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Auth_Container_MDB2::updateUser()
Changes user data in auth table.
LiveUser_Admin_Auth_Container_MDB::updateUser()
Changes user data in auth table.
LiveUser_Admin_Auth_Container_DB::updateUser()
Changes user data in auth table.

Parameters:

string   $authId   —  Auth user ID.
string   $handle   —  Handle (username) (optional).
string   $password   —  Password (optional).
array   $optionalFields   —  Array of optional fields values to be added array('alias' => ''value')
array   $customFields   —  Array of custom fields values to be updated

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:56:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.