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

Class: LiveUser_Admin_Auth_Common

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

Class Overview


Base class for authentication backends.


Author(s):

Version:

  • $Id: Common.php,v 1.5 2004/12/18 22:03:10 lsmith Exp $

Variables

Methods


Child classes:

LiveUser_Admin_Auth_MDB2
Simple MDB2-based complexity driver for LiveUser.
LiveUser_Admin_Auth_MDB
Simple MDB-based complexity driver for LiveUser.
LiveUser_Admin_Auth_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.5 2004/12/18 22:03:10 lsmith Exp $


[ Top ]


Class Variables

$name =  null

[line 59]

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

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

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_MDB2::addUser()
Adds a new user to Auth/MDB2.
LiveUser_Admin_Auth_MDB::addUser()
Adds a new user to Auth/MDB.
LiveUser_Admin_Auth_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 91]

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

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

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

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_MDB2::getUsers()
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.
LiveUser_Admin_Auth_MDB::getUsers()
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.
LiveUser_Admin_Auth_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 205]

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_MDB2::removeUser()
Removes an existing user from Auth/MDB2.
LiveUser_Admin_Auth_MDB::removeUser()
Removes an existing user from Auth/MDB.
LiveUser_Admin_Auth_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 222]

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_MDB2::updateUser()
Changes user data in auth table.
LiveUser_Admin_Auth_MDB::updateUser()
Changes user data in auth table.
LiveUser_Admin_Auth_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 14:00:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.