phpBB::authenticate_pass( string $password, $serialized_pass )
Check for correct password
Description
Parameters
- $password
-
(Required) The password in plain text
- $hash
-
(Required) The stored password hash
Return
(bool) Returns true if the password is correct, false if not.
Source
File: bp-forums/admin/converters/phpBB.php
610 611 612 613 614 615 616 617 618 | public function authenticate_pass( $password , $serialized_pass ) { $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ; $pass_array = unserialize( $serialized_pass ); if ( strlen ( $pass_array [ 'hash' ] ) == 34 ) { return ( $this ->_hash_crypt_private( $password , $pass_array [ 'hash' ], $itoa64 ) === $pass_array [ 'hash' ] ) ? true : false; } return ( md5( $password ) === $pass_array [ 'hash' ] ) ? true : false; } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.