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

Class: Auth_Container_MDB2

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

Class Overview

Auth_Container
   |
   --Auth_Container_MDB2

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 51]
Storage driver for fetching login data from a database

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



[ Top ]


Class Variables

$activeUser =  ''

[line 73]

User that is currently selected from the DB.

Type:   string
Overrides:   Array


[ Top ]

$db =  null

[line 66]

MDB object

Type:   object


[ Top ]

$dsn =  ''

[line 67]


Type:   mixed


[ Top ]

$options = array()

[line 60]

Additional options for the storage container

Type:   array


[ Top ]



Method Detail

Auth_Container_MDB2 (Constructor)   [line 86]

object Returns Auth_Container_MDB2( string $dsn)

Constructor of the container class

Initate connection to the database via PEAR::MDB2

  • Return: an error object if something went wrong

Parameters:

string   $dsn   —  Connection data or MDB2 object

[ Top ]

addUser   [line 445]

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

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

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

string getCryptType( )

Returns the selected crypt type for this container
  • Return: Function used to crypt the password

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

listUsers   [line 383]

mixed listUsers( )

Returns a list of users from the container
  • Return: array|PEAR_Error
  • Access: public

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

query   [line 188]

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 MDB_result object or MDB_OK on success, a MDB or PEAR error on failure
  • Access: public

Parameters:

string   $query   —  Query string

[ Top ]

removeUser   [line 510]

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

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.