Properties

$data

$data : array

Type

array — Contains Information about Tables to get the information

$settings

$settings : array

Type

array — Contains Bridge-specific Settings, like cookie domain etc.

$blnSyncEmail

$blnSyncEmail : boolean

Type

boolean — Set true if email adress should be synced from CMS

$dependencies

$dependencies : 

Type

$shortcuts

$shortcuts : 

Type

$singleton

$singleton : 

Type

$class_hash

$class_hash : 

Type

$name

$name : 

Type

$bridgedb

$bridgedb : object

Type

object — Database Connection to CMS

$prefix

$prefix : string

Type

string — Prefix of CMS

$_shorts

$_shorts : 

Type

$_shorts_loaded

$_shorts_loaded : 

Type

$_class_index

$_class_index : 

Type

Methods

__construct()

__construct(object  $objBridgeDB, string  $strPrefix) 

Constructor

Parameters

object $objBridgeDB
string $strPrefix

check_password()

check_password(string  $password, string  $hash, string  $strSalt = '', boolean  $boolUseHash = false, string  $strUsername = "",   $arrUserdata = array()) : boolean

Check if Password matches with saved Hash

Parameters

string $password

Password

string $hash

Saved Passwordhash

string $strSalt

Saved Salt

boolean $boolUseHash

if $password is a hash or not

string $strUsername

Username

$arrUserdata

Returns

boolean —

true if password matches

sync_fields()

sync_fields() : array

Returns Array with fields that are available to sync Key = fieldid of CMS Value = Name of Field

Returns

array —

Available Fields for Synching

sync()

sync(array  $arrUserdata) : \boolean/array

Returns Array with synched Userdata.

Please return all data, the Bridge Class handles the matching to the profilefields. If you want to sync birthday and country, add key "birthday" and "country" Key = fieldid of CMS Value = fieldvalue

Parameters

array $arrUserdata

Userdata of CMS

Returns

\boolean/array —

Return false if sync is disabled, otherwise return array with synced data

autologin()

autologin(array  $arrCookiedata) : \boolean/array

Autologin. Log User into EQdkp Using Session Information from CMS

Parameters

array $arrCookiedata

Cookiedata of EQdkp Autologin Cookie

Returns

\boolean/array —

Return false if autologin failed, otherwise array with EQdkp Userdata

logout()

logout() : boolean

Logout. Should be used to Logout User from CMS

Returns

boolean

before_login()

before_login(string  $strUsername, string  $strPassword, boolean  $boolSetAutologin = false, boolean  $boolUseHash = false) 

Fired before login. No return value, no influence to login.

Parameters

string $strUsername
string $strPassword
boolean $boolSetAutologin
boolean $boolUseHash

after_login()

after_login(string  $strUsername, string  $strPassword, boolean  $boolSetAutoLogin, array  $arrUserdata, boolean  $boolLoginResult, string  $boolUseHash = false) : boolean

Do some checks after User Passwordchecks.

Returning false prevents user from being logged into EQdkp.

Parameters

string $strUsername
string $strPassword
boolean $boolSetAutoLogin
array $arrUserdata
boolean $boolLoginResult
string $boolUseHash

Returns

boolean —

True if user should be logged in, false if not

login()

login(string  $strUsername, string  $strPassword, boolean  $boolSetAutologin = false, boolean  $boolUseHash = false) : boolean

Login method. Should only be overwritten if default login of Bridge is not enough for you.

Parameters

string $strUsername
string $strPassword
boolean $boolSetAutologin
boolean $boolUseHash

Returns

boolean —

Return 0 is default login should be used. Otherwise return a boolean for the login status.

__get()

__get(  $name) 

Parameters

$name

__isset()

__isset(  $name) 

Parameters

$name

__dependencies()

__dependencies() 

__shortcuts()

__shortcuts() 

__destruct()

__destruct() 

_password_itoa64()

_password_itoa64() 

Returns a string for mapping an int to the corresponding base 64 character.

_password_base64_encode()

_password_base64_encode(  $input,   $count) : \Encoded

Encode bytes into printable base 64 using the *nix standard from crypt().

Parameters

$input

The string containing bytes to encode.

$count

The number of characters (bytes) to encode.

Returns

\Encoded —

string

_password_generate_salt()

_password_generate_salt(  $count_log2) : \A

Generates a random base 64-encoded salt prefixed with settings for the hash.

Proper use of salts may defeat a number of attacks, including:

  • The ability to try candidate passwords against multiple hashes at once.
  • The ability to use pre-hashed lists of candidate passwords.
  • The ability to determine whether two users have the same (or different) password without actually having to guess one of the passwords.

Parameters

$count_log2

Integer that determines the number of iterations used in the hashing process. A larger value is more secure, but takes more time to complete.

Returns

\A —

12 character string containing the iteration count and a random salt.

_password_enforce_log2_boundaries()

_password_enforce_log2_boundaries(  $count_log2) : Integer

Ensures that $count_log2 is within set bounds.

Parameters

$count_log2

Integer that determines the number of iterations used in the hashing process. A larger value is more secure, but takes more time to complete.

Returns

Integer —

within set bounds that is closest to $count_log2.

_password_crypt()

_password_crypt(  $algo,   $password,   $setting) : \A

Hash a password using a secure stretched hash.

By using a salt and repeated hashing the password is "stretched". Its security is increased because it becomes much more computationally costly for an attacker to try to break the hash by brute-force computation of the hashes of a large number of plain-text words or strings to find a match.

Parameters

$algo

The string name of a hashing algorithm usable by hash(), like 'sha256'.

$password

The plain-text password to hash.

$setting

An existing hash or the output of _password_generate_salt(). Must be at least 12 characters (the settings and salt).

Returns

\A —

string containing the hashed password (and salt) or FALSE on failure. The return string will be truncated at DRUPAL_HASH_LENGTH characters max.

_password_get_count_log2()

_password_get_count_log2(  $setting) 

Parse the log2 iteration count from a stored hash or setting string.

Parameters

$setting

user_hash_password()

user_hash_password(  $password,   $count_log2) : \A

Hash a password using a secure hash.

Parameters

$password

A plain-text password.

$count_log2

Optional integer to specify the iteration count. Generally used only during mass operations where a value less than the default is needed for speed.

Returns

\A —

string containing the hashed password (and a salt), or FALSE on failure.

user_check_password()

user_check_password(  $password,   $hash) : TRUE

Check whether a plain text password matches a stored hashed password.

Alternative implementations of this function may use other data in the $account object, for example the uid to look up the hash in a custom table or remote database.

Parameters

$password

A plain-text password

$hash

Returns

TRUE —

or FALSE.