File/plugins/change_password/backend/peardb.php

Description

Change password PearDB backend

  • version: $Id: peardb.php 1254 2008-04-06 06:13:51Z tokul $
  • copyright: (c) 2005-2006 The SquirrelMail Project Team
  • copyright: (c) 2006-2007 The NaSMail Project
  • license: GNU Public License
Includes
 include_once ('DB.php') (line 19)

load Pear DB.

Global is needed because library must be loaded before configuration in order to use DB constants.

Variables
array $cpw_peardb_connect_opts (line 37)

Pear DB connection options

boolean $cpw_peardb_crypted_passwd (line 67)

Passwords are plaintext or encrypted

boolean $cpw_peardb_debug (line 75)

Controls output debugging errors Error messages might contain login and password information.

Don't enable on production systems.

string $cpw_peardb_domain_field (line 55)

Field that stores domain part of username

mixed $cpw_peardb_dsn (line 31)

Connection DSN.

Any format supported by peardb

string $cpw_peardb_passwd_field (line 61)

Field that stores password

string $cpw_peardb_table (line 43)

Table that stores user information

string $cpw_peardb_uid_field (line 49)

Field that stores user name

Functions
cpw_peardb_detect_crypto (line 314)

Detects password crypto

reports 'crypt' if fails to detect any other crypt

string cpw_peardb_detect_crypto (string $password)
  • string $password
cpw_peardb_dochange (line 144)

Changes password

  • return: Array of error messages.
array cpw_peardb_dochange (array $data)
  • array $data: data The username/curpw/newpw data.
cpw_peardb_init (line 109)

Checks if configuration is correct

void cpw_peardb_init ()
cpw_peardb_passwd_hash (line 358)

Encode password

  • return: hashed password. false, if hashing fails
string cpw_peardb_passwd_hash (string $password, string $crypto,  &$msgs, [string $forced_salt = ''], array $msgs)
  • string $password: plain text password
  • string $crypto: used crypto
  • array $msgs: error messages
  • string $forced_salt: old password used to create password hash for verification
  • &$msgs

Documentation generated on Sun, 22 Nov 2009 17:36:44 +0200 by phpDocumentor 1.4.3