Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The VBulletin_ExternalAuthDriver class

AMI_ExternalAuthDriver
   |
   --VBulletin_ExternalAuthDriver

• Introduction

VBulletin common auth driver class.

• Class synopsis

VBulletin_ExternalAuthDriver extends AMI_ExternalAuthDriver {
/* Inherited Constants */
// Error 1001: wrong user object (invalid object type or null)
// Error 1001: message
const AMI_ExternalAuthDriver::MSG_WRONG_OBJECT =  'Wrong user object';
/* Properties */
// An associative array with driver specific options
protected array $aSettings = array( 'forum_url' => '', 'db_host' => '', 'db_username' => '', 'db_flags' => 0, 'db_password' => '', 'db_database' => '', 'db_prefix' => '', 'cookie_ttl' => 3600, 'cookie_path' => '/', 'secret_key' => 'Default secret key', );
/* Inherited Properties */
// Instance
/* Methods */
// Returns an instance of VBulletin_ExternalAuthDriver.
public static getInstance ( ) returns VBulletin_ExternalAuthDriver;
// Custom handler for on_after_user_create event.
public afterCreate ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
// Custom handler for on_after_user_login event.
public afterLogin ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
// Custom handler for on_after_user_update event.
public afterUpdate ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
// Custom handler for on_before_user_login event.
public beforeLogin ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
// Custom handler for on_before_user_logout event.
public beforeLogout ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
// Checks if specified secret key is valid for current username.
public checkSecretKey ( string $username, string $remoteKey ) returns bool;
// Initializes external auth driver.
public init ( [ $aSettings = array() ] ) returns bool;
/* Inherited Methods */
// Initialize settings.
public AMI_ExternalAuthDriver::init ( [ $aSettings = array() ] ) returns void;
// Object could be created, through getInstance only.
protected AMI_ExternalAuthDriver::__construct ( ) returns AMI_ExternalAuthDriver;
// Object could be cloned.
protected AMI_ExternalAuthDriver::__clone ( ) returns void;
}
Tags:
since 5.12.4

• Class Properies

protected array $aSettings

An associative array with driver specific options

Keys:

  • 'forum_url' - vBulletin URL;
  • 'db_host' - Database: host;
  • 'db_username' - Database: username;
  • 'db_password' - Database: password;
  • 'db_flags' - Database: client flags (since 6.0.6)
  • 'db_database' - Database: name;
  • 'db_prefix' - Database: tables prefix;
  • 'cookie_ttl' - Cookies: time to live (seconds);
  • 'cookie_path' - Cookies: path;
  • 'secret_key' - Secret hash used for vBulletin authorization through social networks.

• Class Methods

// Returns an instance of VBulletin_ExternalAuthDriver.
public static getInstance ( ) returns VBulletin_ExternalAuthDriver;
// Custom handler for on_after_user_create event.
public afterCreate ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
  • string $name
    Event name
  • array $aEvent
    Event data
  • string $handlerModId
    Handler module id
  • string $srcModId
    Source module id
// Custom handler for on_after_user_login event.
public afterLogin ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
  • string $name
    Event name
  • array $aEvent
    Event data
  • string $handlerModId
    Handler module id
  • string $srcModId
    Source module id
// Custom handler for on_after_user_update event.
public afterUpdate ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
  • string $name
    Event name
  • array $aEvent
    Event data
  • string $handlerModId
    Handler module id
  • string $srcModId
    Source module id
// Custom handler for on_before_user_login event.
public beforeLogin ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
  • string $name
    Event name
  • array $aEvent
    Event data
  • string $handlerModId
    Handler module id
  • string $srcModId
    Source module id
// Custom handler for on_before_user_logout event.
public beforeLogout ( string $name, $aEvent, string $handlerModId, string $srcModId ) returns array;
  • string $name
    Event name
  • array $aEvent
    Event data
  • string $handlerModId
    Handler module id
  • string $srcModId
    Source module id
// Checks if specified secret key is valid for current username.
public checkSecretKey ( string $username, string $remoteKey ) returns bool;
  • string $username
    User login
  • string $remoteKey
    Secret key to check
// Initializes external auth driver.
public init ( [ $aSettings = array() ] ) returns bool;
  • array $aSettings
    Settings array