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_Cyrsql

The Horde_Auth_Cyrsql class provides a SQL implementation of the Horde authentication system for the Cyrus IMAP server. Most of the functionality is the same as for the SQL class; only what is different overrides the parent class implementations.

The table structure for the auth system is as follows:

CREATE TABLE accountuser (
    username    VARCHAR(255) BINARY NOT NULL DEFAULT '',
    password    VARCHAR(32) BINARY NOT NULL DEFAULT '',
    prefix      VARCHAR(50) NOT NULL DEFAULT '',
    domain_name VARCHAR(255) NOT NULL DEFAULT '',
    UNIQUE KEY username (username)
);

CREATE TABLE adminuser (
    username    VARCHAR(50) BINARY NOT NULL DEFAULT '',
    password    VARCHAR(50) BINARY NOT NULL DEFAULT '',
    type        INT(11) NOT NULL DEFAULT '0',
    SID         VARCHAR(255) NOT NULL DEFAULT '',
    home        VARCHAR(255) NOT NULL DEFAULT '',
    PRIMARY KEY (username)
);

CREATE TABLE alias (
    alias       VARCHAR(255) NOT NULL DEFAULT '',
    dest        LONGTEXT,
    username    VARCHAR(50) NOT NULL DEFAULT '',
    status      INT(11) NOT NULL DEFAULT '1',
    PRIMARY KEY (alias)
);

CREATE TABLE domain (
    domain_name VARCHAR(255) NOT NULL DEFAULT '',
    prefix      VARCHAR(50) NOT NULL DEFAULT '',
    maxaccounts INT(11) NOT NULL DEFAULT '20',
    quota       INT(10) NOT NULL DEFAULT '20000',
    transport   VARCHAR(255) NOT NULL DEFAULT 'cyrus',
    freenames   ENUM('YES','NO') NOT NULL DEFAULT 'NO',
    freeaddress ENUM('YES','NO') NOT NULL DEFAULT 'NO',
    PRIMARY KEY (domain_name),
    UNIQUE KEY prefix (prefix)
);

CREATE TABLE domainadmin (
    domain_name VARCHAR(255) NOT NULL DEFAULT '',
    adminuser   VARCHAR(255) NOT NULL DEFAULT ''
);

CREATE TABLE search (
    search_id   VARCHAR(255) NOT NULL DEFAULT '',
    search_sql  TEXT NOT NULL,
    perpage     INT(11) NOT NULL DEFAULT '0',
    timestamp   TIMESTAMP(14) NOT NULL,
    PRIMARY KEY (search_id),
    KEY search_id (search_id)
);

CREATE TABLE virtual (
    alias       VARCHAR(255) NOT NULL DEFAULT '',
    dest        LONGTEXT,
    username    VARCHAR(50) NOT NULL DEFAULT '',
    status      INT(11) NOT NULL DEFAULT '1',
    KEY alias (alias)
);

CREATE TABLE log (
    id          INT(11) NOT NULL AUTO_INCREMENT,
    msg         TEXT NOT NULL,
    user        VARCHAR(255) NOT NULL DEFAULT '',
    host        VARCHAR(255) NOT NULL DEFAULT '',
    time        DATETIME NOT NULL DEFAULT '2000-00-00 00:00:00',
    pid         VARCHAR(255) NOT NULL DEFAULT '',
    PRIMARY KEY (id)
);

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_Cyrsql
Package: Auth
Category: Horde
License: LGPL-2.1
Author: Ilya Krel mail@krel.org
Author: Jan Schneider jan@horde.org
Located at Horde/Auth/Cyrsql.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Parameters

$params
Parameters: <pre><span class="php-quote">'charset'</span> - (string) <span class="php-keyword1">Default</span> charset. <span class="php-keyword1">DEFAULT</span>: NONE <span class="php-quote">'domain_field'</span> - (string) <span class="php-keyword1">If</span> set to anything other than <span class="php-quote">'none'</span> this is used <span class="php-keyword1">as</span> field name where domain is stored. <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'domain_name'</span> <span class="php-quote">'folders'</span> - (<span class="php-keyword1">array</span>) An <span class="php-keyword1">array</span> of folders to create under username. <span class="php-keyword1">DEFAULT</span>: NONE <span class="php-quote">'hidden_accounts'</span> - (<span class="php-keyword1">array</span>) An <span class="php-keyword1">array</span> of <span class="php-keyword2">system</span> accounts to hide from the user <span class="php-keyword1">interface</span>. <span class="php-keyword1">DEFAULT</span>: None. <span class="php-quote">'imap'</span> - (Horde_Imap_Client_Base) [REQUIRED] An IMAP client object. <span class="php-quote">'quota'</span> - (integer) The quota (in kilobytes) to grant on the mailbox. <span class="php-keyword1">DEFAULT</span>: NONE <span class="php-quote">'userhierarchy'</span> - (string) The user hierarchy prefix. <span class="php-keyword1">DEFAULT</span>: <span class="php-quote">'user.'</span></pre>

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

Throw

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::addUser()
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 mixed
# listUsers( mixed $sort = false )

List all users in the system.

List all users in the system.

Returns

mixed
The array of userIds.

Throws

Horde_Auth_Exception

Overrides

Horde_Auth_Sql::listUsers()
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. [NOT SUPPORTED]
$credentials
The new credentials

Throws

Horde_Auth_Exception

Overrides

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