$data
$data : array
Bridge Generic. Is abstract class, all Bridge have to extend this class.
check_password(string $password, string $hash, string $strSalt = '', boolean $boolUseHash = false, string $strUsername = "", $arrUserdata = array()) : boolean
Check if Password matches with saved Hash
string | $password | Password |
string | $hash | Saved Passwordhash |
string | $strSalt | Saved Salt |
boolean | $boolUseHash | if $password is a hash or not |
string | $strUsername | Username |
$arrUserdata |
true if password matches
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
array | $arrUserdata | Userdata of CMS |
Return false if sync is disabled, otherwise return array with synced data
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.
string | $strUsername | |
string | $strPassword | |
boolean | $boolSetAutoLogin | |
array | $arrUserdata | |
boolean | $boolLoginResult | |
string | $boolUseHash |
True if user should be logged in, false if not
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.
string | $strUsername | |
string | $strPassword | |
boolean | $boolSetAutologin | |
boolean | $boolUseHash |
Return 0 is default login should be used. Otherwise return a boolean for the login status.
_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:
$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. |
12 character string containing the iteration count and a random salt.
_password_enforce_log2_boundaries( $count_log2) : Integer
Ensures that $count_log2 is within set bounds.
$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. |
within set bounds that is closest to $count_log2.
_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.
$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). |
string containing the hashed password (and salt) or FALSE on failure. The return string will be truncated at DRUPAL_HASH_LENGTH characters max.
user_hash_password( $password, $count_log2) : \A
Hash a password using a secure hash.
$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. |
string containing the hashed password (and a salt), or FALSE on failure.
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.
$password | A plain-text password |
|
$hash |
or FALSE.