Overview

Packages

  • Auth

Classes

  • Horde_Auth
  • Horde_Auth_Auto
  • Horde_Auth_Base
  • Horde_Auth_Composite
  • Horde_Auth_Customsql
  • Horde_Auth_Cyrsql
  • Horde_Auth_Exception
  • Horde_Auth_Ftp
  • Horde_Auth_Http
  • Horde_Auth_Http_Remote
  • Horde_Auth_Imap
  • Horde_Auth_Ipbasic
  • Horde_Auth_Kolab
  • Horde_Auth_Ldap
  • Horde_Auth_Login
  • Horde_Auth_Msad
  • Horde_Auth_Pam
  • Horde_Auth_Passwd
  • Horde_Auth_Peclsasl
  • Horde_Auth_Radius
  • Horde_Auth_Shibboleth
  • Horde_Auth_Smb
  • Horde_Auth_Smbclient
  • Horde_Auth_Sql
  • Horde_Auth_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Auth_Customsql

The Horde_Auth_Customsql class provides a sql implementation of the Horde authentication system with the possibility to set custom-made queries.

Copyright 2002 Ronnie Garcia ronnie@mk2.net Copyright 2002-2012 Horde LLC (http://www.horde.org/)

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

Horde_Auth_Base
Extended by Horde_Auth_Sql
Extended by Horde_Auth_Customsql
Package: Auth
Category: Horde
License: LGPL-2.1
Author: Ronnie Garcia ronnie@mk2.net
Author: Chuck Hagenbuch chuck@horde.org
Author: Joel Vandal joel@scopserv.com
Located at Horde/Auth/Customsql.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Some special tokens can be used in the SQL query. They are replaced at the query stage: '\L' will be replaced by the user's login '\P' will be replaced by the user's password. '\O' will be replaced by the old user's login (required for update)

Eg: "SELECT * FROM users WHERE uid = \L AND passwd = \P AND billing = 'paid'"

Parameters

$params
<p>Configuration parameters: - query_auth: (string) Authenticate the user. ('\L' &amp; '\P') - query_add: (string) Add user. ('\L' &amp; '\P') - query_getpw: (string) Get one user's password. ('\L') - query_update: (string) Update user. ('\O', '\L' &amp; '\P') - query_resetpassword: (string) Reset password. ('\L', &amp; '\P') - query_remove: (string) Remove user. ('\L') - query_list: (string) List user. - query_exists: (string) Check for existance of user. ('\L')</p>

Throws

InvalidArgumentException

Overrides

Horde_Auth_Sql::__construct()
public
# addUser( string $userId, array $credentials )

Add a set of authentication credentials.

Add a set of authentication credentials.

Parameters

$userId
The userId to add.
$credentials
The credentials to add.

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::addUser()
public
# updateUser( string $oldId, string $newId, array $credentials )

Update a set of authentication credentials.

Update a set of authentication credentials.

Parameters

$oldId
The old userId.
$newId
The new userId.
$credentials
The new credentials

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::updateUser()
public string
# resetPassword( string $userId )

Resets a user's password. Used for example when the user does not remember the existing password.

Resets a user's password. Used for example when the user does not remember the existing password.

Parameters

$userId
The user id for which to reset the password.

Returns

string
The new password on success.

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::resetPassword()
public
# removeUser( string $userId )

Delete a set of authentication credentials.

Delete a set of authentication credentials.

Parameters

$userId
The userId to delete.

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::removeUser()
public array
# listUsers( mixed $sort = false )

List all users in the system.

List all users in the system.

Returns

array
The array of userIds.

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::listUsers()
public boolean
# exists( string $userId )

Checks if a userId exists in the system.

Checks if a userId exists in the system.

Parameters

$userId
User ID for which to check

Returns

boolean
Whether or not the userId already exists.

Overrides

Horde_Auth_Sql::exists()
Methods inherited from Horde_Auth_Base
authenticate(), getCredential(), getError(), getParam(), hasCapability(), isLocked(), lockUser(), setCredential(), setError(), transparent(), unlockUser(), validateAuth()
API documentation generated by ApiGen