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

Class: Auth_Container_MDB

Source Location: /Auth-1.3.0r2/Container/MDB.php

Class Overview

Auth_Container
   |
   --Auth_Container_MDB

Storage driver for fetching login data from a database


Author(s):

Version:

  • $Revision: 1.15 $

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::removeUser()
Remove user from the storage container
Auth_Container::supportsChallengeResponce()
Returns true if the container supports Challenge Responce
Auth_Container::verifyPassword()
Crypt and verfiy the entered password

Class Details

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

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



[ Top ]


Class Variables

$activeUser =  ''

[line 55]

User that is currently selected from the DB.

Type:   string
Overrides:   Array


[ Top ]

$db =  null

[line 48]

MDB object

Type:   object


[ Top ]

$dsn =  ''

[line 49]


Type:   mixed


[ Top ]

$options = array()

[line 42]

Additional options for the storage container

Type:   array


[ Top ]



Method Detail

Auth_Container_MDB (Constructor)   [line 67]

object Returns Auth_Container_MDB( string $dsn)

Constructor of the container class

Initate connection to the database via PEAR::MDB

  • Return: an error object if something went wrong

Parameters:

string   $dsn   —  Connection data or MDB object

[ Top ]

addUser   [line 326]

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

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

[ Top ]

fetchData   [line 217]

mixed fetchData( string $username, string $password)

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

[ Top ]

listUsers   [line 279]

array listUsers( )


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

query   [line 147]

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

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 ]


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