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_Sql

The Horde_Auth_Sql class provides a SQL implementation of the Horde authentication system.

The table structure for the Auth system is in horde/scripts/sql/horde_users.sql.

Copyright 1999-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

Direct known subclasses

Horde_Auth_Customsql, Horde_Auth_Cyrsql
Package: Auth
Category: Horde
License: LGPL-2.1
Author: Chuck Hagenbuch chuck@horde.org
Located at Horde/Auth/Sql.php
Methods summary
public
# __construct( array $params = array() )

Constructor

Constructor

Parameters

$params
<p>Parameters: 'db' - (Horde_Db_Adapter) [REQUIRED] Database object.</p> <pre><span class="php-quote">'encryption'</span> - (string) The encryption to <span class="php-keyword1">use</span> to store the password in the table (e.g. plain, <span class="php-keyword2">crypt</span>, <span class="php-keyword2">md5</span>-hex, <span class="php-keyword2">md5</span>-base64, smd5, sha, ssha, aprmd5). <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'md5-hex'</span> <span class="php-quote">'hard_expiration_field'</span> - (string) The name of the field containing a <span class="php-keyword2">date</span> after which the account is no longer valid <span class="php-keyword1">and</span> the user will not be able to <span class="php-keyword2">log</span> in at all. <span class="php-keyword1">DEFAULT</span>: none <span class="php-quote">'password_field'</span> - (string) The name of the password field in the auth table. <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'user_pass'</span> <span class="php-quote">'show_encryption'</span> - (boolean) Whether <span class="php-keyword1">or</span> not to prepend the encryption in the password field. <span class="php-keyword1">DEFAULT</span>: <span class="php-keyword1">false</span> <span class="php-quote">'soft_expiration_field'</span> - (string) The name of the field containing a <span class="php-keyword2">date</span> after which the <span class="php-keyword2">system</span> will request the user change his <span class="php-keyword1">or</span> her password. <span class="php-keyword1">DEFAULT</span>: none <span class="php-quote">'table'</span> - (string) The name of the SQL table to <span class="php-keyword1">use</span> in <span class="php-quote">'database'</span>. <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'horde_users'</span> <span class="php-quote">'username_field'</span> - (string) The name of the username field in the auth table. <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'user_uid'</span></pre>

Throws

InvalidArgumentException

Overrides

Horde_Auth_Base::__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_Base::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_Base::updateUser()
public string
# resetPassword( string $userId )

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

Reset 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_Base::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_Base::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_Base::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_Base::exists()
Methods inherited from Horde_Auth_Base
authenticate(), getCredential(), getError(), getParam(), hasCapability(), isLocked(), lockUser(), setCredential(), setError(), transparent(), unlockUser(), validateAuth()
API documentation generated by ApiGen