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

Class: LiveUser_Admin_Auth_Common

Source Location: /LiveUser_Admin-0.2.0/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_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 75]
Base class for authentication backends.


[ Top ]


Class Variables

$containerName =  null

[line 114]

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

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

Type:   string


[ Top ]



Method Detail

LiveUser_Admin_Auth_Common (Constructor)   [line 121]

LiveUser_Admin_Auth_Common LiveUser_Admin_Auth_Common( )

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

[ Top ]

addUser   [line 233]

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

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 ]

encryptPW   [line 179]

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   —  encryption type

[ Top ]

getProperty   [line 213]

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

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 ]

init   [line 126]

void init( $conf, $containerName)


Overridden in child classes as:

LiveUser_Admin_Auth_MDB2::init()
LiveUser_Admin_Auth_MDB::init()
LiveUser_Admin_Auth_DB::init()

Parameters:

   $conf   — 
   $containerName   — 

[ Top ]

removeUser   [line 247]

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

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:29:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.