CustomerPassword

Implements \CustomerPasswordInterface

Class CustomerPassword

Represents a customer's password.

deprecated

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

category

System

package

Customer

subpackage

ValueObjects

implements

CustomerPasswordInterface

Methods

Constructor for the class CustomerPassword.

__construct(string $p_password, boolean $p_disableHash = false) 

Validates password and build md5-hash.

Throws
\InvalidArgumentException

If $p_password is not a string.

Arguments

$p_password

string

Customer's password.

$p_disableHash

boolean

(optional) Will not hash the provided password string.

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

__toString() : string

Response

string

Get password hash string.

_getHash(string $p_password) : string
deprecated

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

Throws
\RuntimeException

If the password_hash function fails to hash the password.

Arguments

$p_password

string

Password to be hashed.

Response

string

Properties

Customer's password.

password : string
var

Type(s)

string