PHP 클래스 Horde_Auth_Cyrsql, horde

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)
);
저자: Ilya Krel ([email protected])
저자: Jan Schneider ([email protected])
상속: extends Horde_Auth_Sql
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_capabilities array An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
$_imap Horde_Imap_Client_Base Horde_Imap_Client object.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
addUser ( string $userId, array $credentials ) Add a set of authentication credentials.
listUsers ( boolean $sort = false ) : mixed List all users in the system.
removeUser ( string $userId ) Delete a set of authentication credentials.
updateUser ( string $oldID, string $newID, array $credentials ) Update a set of authentication credentials.

보호된 메소드들

메소드 설명
_authenticate ( string $userId, array $credentials ) Find out if a set of login credentials are valid.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array Parameters: - domain_field: (string) If set to anything other than 'none' this is used as field name where domain is stored. DEFAULT: 'domain_name' - folders: (array) An array of folders to create under username. DEFAULT: NONE - hidden_accounts: (array) An array of system accounts to hide from the user interface. DEFAULT: None. - imap: (Horde_Imap_Client_Base) [REQUIRED] An IMAP client object. - quota: (integer) The quota (in kilobytes) to grant on the mailbox. DEFAULT: NONE - userhierarchy: (string) The user hierarchy prefix (UTF-8). DEFAULT: 'user.'

_authenticate() 보호된 메소드

Find out if a set of login credentials are valid.
protected _authenticate ( string $userId, array $credentials )
$userId string The userId to check.
$credentials array The credentials to use.

addUser() 공개 메소드

Add a set of authentication credentials.
public addUser ( string $userId, array $credentials )
$userId string The userId to add.
$credentials array The credentials to add.

listUsers() 공개 메소드

List all users in the system.
public listUsers ( boolean $sort = false ) : mixed
$sort boolean Sort the users?
리턴 mixed The array of userIds.

removeUser() 공개 메소드

Delete a set of authentication credentials.
public removeUser ( string $userId )
$userId string The userId to delete.

updateUser() 공개 메소드

Update a set of authentication credentials.
public updateUser ( string $oldID, string $newID, array $credentials )
$oldID string The old userId.
$newID string The new userId. [NOT SUPPORTED]
$credentials array The new credentials

프로퍼티 상세

$_capabilities 보호되어 있는 프로퍼티

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
protected array $_capabilities
리턴 array

$_imap 보호되어 있는 프로퍼티

Horde_Imap_Client object.
protected Horde_Imap_Client_Base $_imap
리턴 Horde_Imap_Client_Base