phpDocumentor

CustomerPassword
in package
implements CustomerPasswordInterface

Class CustomerPassword

Represents a customer's password.

Tags
deprecated

This class is deprecated and will be deleted in GX 3.7. Use CustomerHashedPassword instead.

category

System

subpackage

ValueObjects

implements

CustomerPasswordInterface

Interfaces, Classes and Traits

CustomerPasswordInterface
Value Object.

Table of Contents

$password  : string
Customer's password.
__construct()  : mixed
Constructor for the class CustomerPassword.
__toString()  : string
Returns the password string value (either hashed or not).
_getHash()  : string
Get password hash string.

Properties

Methods

__construct()

Constructor for the class CustomerPassword.

public __construct(string $p_password[, bool $p_disableHash = false ]) : mixed

Validates password and build md5-hash.

Parameters
$p_password : string

Customer's password.

$p_disableHash : bool = false

(optional) Will not hash the provided password string.

Tags
throws
InvalidArgumentException

If $p_password is not a string.

Return values
mixed

__toString()

Returns the password string value (either hashed or not).

public __toString() : string
Return values
string

_getHash()

Get password hash string.

protected _getHash(string $p_password) : string
Parameters
$p_password : string

Password to be hashed.

Tags
throws
RuntimeException

If the password_hash function fails to hash the password.

deprecated

Automatic password hashing is deprecated. Use the AuthService::getHash() for hashing instead.

Return values
string

Search results