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

Class: LiveUser_Admin_Auth_Common

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

Class Overview


Base class for authentication backends.


Author(s):

Version:

  • $Id: Common.php,v 1.23 2004/06/21 20:21:24 lsmith 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.23 2004/06/21 20:21:24 lsmith 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 206]

mixed addUser( string $handle, [string $password = ''], [boolean $active = true], [mixed $owner_user_id = null], [integer $owner_group_id = null], [integer $authId = null], [mixed $customFields = array()], array 7)

Adds a new user to Auth.
  • Return: Users auth ID on success, PEAR error if not.
  • 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:

array   7   —  Array of custom fields to be added
string   $handle   —  Handle (username).
string   $password   —  Password (optional).
boolean   $active   —  Sets the user active (1) or not (0) (optional).
mixed   $owner_user_id   —  If specificed no new ID will be automatically generated instead
integer   $owner_group_id   —  ID of the owning user.
integer   $authId   —  ID of the owning group.
mixed   $customFields   —  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 264]

mixed getUsers( [array $filters = array()], [array $customFields = array()])

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 error object.
  • 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
array   $customFields   —  custom fields you wane to be returned

[ Top ]

removeUser   [line 220]

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

mixed updateUser( string $authId, [string $handle = ''], [string $password = ''], [boolean $active = null], [integer $owner_user_id = null], [integer $owner_group_id = null], [array $customFields = array()])

Changes user data in auth table.
  • Return: True on success, error object 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).
boolean   $active   —  Sets the user active (1) or not (0) (optional).
integer   $owner_user_id   —  ID of the owning user.
integer   $owner_group_id   —  ID of the owning group.
array   $customFields   —  Array of custom fields to be updated.

[ Top ]


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