Class Passwd_Driver_sql

Description

The SQL driver attempts to change a user's password stored in an SQL databse and implements the Passwd_Driver API.

$Horde: passwd/lib/Driver/sql.php,v 1.24.2.8 2009/01/06 15:25:23 jan Exp $

Copyright 2000-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.php.

Located in /lib/Driver/sql.php (line 20)

Passwd_Driver
   |
   --Passwd_Driver_sql
Variable Summary
 boolean $_connected
 DB $_db
Method Summary
 Passwd_Driver_sql Passwd_Driver_sql ([array $params = array()])
 boolean changePassword (string $username, string $old_password, string $new_password)
 boolean _connect ()
 boolean _lookup ( $user, string $old_password, string $userID)
 boolean _modify (string $user, string $new_password)
 string _parseQuery (string $string, string $user, string $password)
Variables
boolean $_connected = false (line 34)

State of SQL connection.

DB $_db (line 27)

SQL connection object.

Inherited Variables

Inherited from Passwd_Driver

Passwd_Driver::$_errorstr
Passwd_Driver::$_params
Methods
Constructor Passwd_Driver_sql (line 41)

Constructs a new Passwd_Driver_sql object.

Passwd_Driver_sql Passwd_Driver_sql ([array $params = array()])
  • array $params: A hash containing connection parameters.
changePassword (line 247)

Change the user's password.

  • return: True or false based on success of the change.
boolean changePassword (string $username, string $old_password, string $new_password)
  • string $username: The user for which to change the password.
  • string $old_password: The old (current) user password.
  • string $new_password: The new user password to set.

Redefinition of:
Passwd_Driver::changePassword()
Change the user's password.
_connect (line 67)

Connect to the database.

  • return: True on success or PEAR_Error on failure.
boolean _connect ()
_lookup (line 101)

Find out if a username and password is valid.

  • return: True on valid or PEAR_Error on invalid.
boolean _lookup ( $user, string $old_password, string $userID)
  • string $userID: The userID to check.
  • string $old_password: An old password to check.
  • $user
_modify (line 146)

Modify (update) a mysql password record for a user.

  • return: True or False based on success of the modify.
boolean _modify (string $user, string $new_password)
  • string $user: The user whose record we will udpate.
  • string $new_password: The new password value to set.
_parseQuery (line 188)

Parse the string as an SQL query substituting placeholders for their values.

  • return: The processed SQL query.
string _parseQuery (string $string, string $user, string $password)
  • string $string: The string to process as a query.
  • string $user: The user to use for the %u placeholder.
  • string $password: The password to use for the %p and %e placeholders.

Inherited Methods

Inherited From Passwd_Driver

 Passwd_Driver::Passwd_Driver()
 Passwd_Driver::changePassword()
 Passwd_Driver::comparePasswords()
 Passwd_Driver::encryptPassword()
 Passwd_Driver::factory()

Documentation generated on Sun, 30 Jan 2011 05:36:08 +0000 by phpDocumentor 1.4.3