public function passwordMatches($password, $user)
    {
        if (!is_array($user)) {
            $user = $this->get($user);
        }

        if (empty($user['hash'])) {
            return false;
        }

        return gplcart_string_equals($user['hash'], gplcart_string_hash($password, $user['hash'], 0));
    }
public function passwordMatches($password, $user)
    {
        if (!is_array($user)) {
            $user = $this->get($user);
        }

        if (empty($user['hash'])) {
            return false;
        }

        return gplcart_string_equals($user['hash'], gplcart_string_hash($password, $user['hash'], 0));
    }
public function passwordMatches ( $ password , $ user ) { if ( ! is_array ( $ user ) ) { $ user = $ this -> get ( $ user ) ; } if ( empty ( $ user [ 'hash' ] ) ) { return false ; } return gplcart_string_equals ( $ user [ 'hash' ] , gplcart_string_hash ( $ password , $ user [ 'hash' ] , 0 ) ) ; }
Whether the password matches the user's password stored in the database
@param string $password
@param array|int $user
@return boolean
Whether the password matches the user s password stored in the database