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

Class: Auth_Container_DB

Source Location: /Auth-1.6.4/Auth/Container/DB.php

Class Overview

Auth_Container
   |
   --Auth_Container_DB

Storage driver for fetching login data from a database


Author(s):

Version:

  • Release: @package_version@ File: $Revision: 256753 $

Copyright:

  • 2001-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods

Class: Auth_Container

Auth_Container::Auth_Container()
Constructor
Auth_Container::addUser()
Add a new user to the storage container
Auth_Container::changePassword()
Change password for user in the storage container
Auth_Container::fetchData()
Fetch data from storage container
Auth_Container::getCryptType()
Returns the crypt current crypt type of the container
Auth_Container::getUser()
Returns a user assoc array
Auth_Container::listUsers()
List all users that are available from the storage container
Auth_Container::log()
Log a message to the Auth log
Auth_Container::removeUser()
Remove user from the storage container
Auth_Container::supportsChallengeResponse()
Returns true if the container supports Challenge Response
Auth_Container::verifyPassword()
Crypt and verfiy the entered password

Class Details

[line 49]
Storage driver for fetching login data from a database

This storage driver can use all databases which are supported by the PEAR DB abstraction layer to fetch login data.



[ Top ]


Class Variables

$activeUser =  ''

[line 71]

User that is currently selected from the DB.

Type:   string
Overrides:   Array


[ Top ]

$db =  null

[line 64]

DB object

Type:   object


[ Top ]

$dsn =  ''

[line 65]


Type:   mixed


[ Top ]

$options = array()

[line 58]

Additional options for the storage container

Type:   array


[ Top ]



Method Detail

Auth_Container_DB (Constructor)   [line 85]

object Returns Auth_Container_DB( string $dsn)

Constructor of the container class

Save the initial options passed to the container. Initiation of the DB connection is no longer performed here and is only done when needed.

  • Return: an error object if something went wrong

Parameters:

string   $dsn   —  Connection data or DB object

[ Top ]

addUser   [line 452]

mixed addUser( string $username, string $password, [mixed $additional = ""])

Add user to the storage container
  • Return: True on success, otherwise error object
  • Access: public

Overrides Auth_Container::addUser() (Add a new user to the storage container)

Parameters:

string   $username   —  Username
string   $password   —  Password
mixed   $additional   —  Additional information that are stored in the DB

[ Top ]

changePassword   [line 562]

void changePassword( string $username, string $password)

Change password for user in the storage container

Overrides Auth_Container::changePassword() (Change password for user in the storage container)

Parameters:

string   $username   —  Username
string   $password   —  The new password (plain text)

[ Top ]

fetchData   [line 295]

mixed fetchData( string $username, string $password, [boolean $isChallengeResponse = false])

Get user information from database

This function uses the given username to fetch the corresponding login data from the database table. If an account that matches the passed username and password is found, the function returns true. Otherwise it returns false.

  • Return: Error object or boolean

Overrides Auth_Container::fetchData() (Fetch data from storage container)

Parameters:

string   $username   —  Username
string   $password   —  Password
boolean   $isChallengeResponse   —  If true password is secured using a md5 hash the frontend and auth are responsible for making sure the container supports challenge response password authentication

[ Top ]

getCryptType   [line 631]

void getCryptType( )

Returns the selected crypt type for this container

Overrides Auth_Container::getCryptType() (Returns the crypt current crypt type of the container)
[ Top ]

listUsers   [line 389]

mixed listUsers( )

Returns a list of users from the container
  • Access: public

Overrides Auth_Container::listUsers() (List all users that are available from the storage container)
[ Top ]

query   [line 190]

mixed query( string $query)

Prepare query to the database

This function checks if we have already opened a connection to the database. If that's not the case, a new connection is opened. After that the query is passed to the database.

  • Return: a DB_result object or DB_OK on success, a DB or PEAR error on failure
  • Access: public

Parameters:

string   $query   —  Query string

[ Top ]

removeUser   [line 518]

mixed removeUser( string $username)

Remove user from the storage container
  • Return: True on success, otherwise error object
  • Access: public

Overrides Auth_Container::removeUser() (Remove user from the storage container)

Parameters:

string   $username   —  Username

[ Top ]

supportsChallengeResponse   [line 620]

bool supportsChallengeResponse( )

Determine if this container supports password authentication with challenge response
  • Access: public

Overrides Auth_Container::supportsChallengeResponse() (Returns true if the container supports Challenge Response)
[ Top ]


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