interface PasswordUpgraderInterface

Methods

void
upgradePassword(PasswordAuthenticatedUserInterface$user,string$newHashedPassword)

Upgrades the hashed password of a user, typically for using a better hash algorithm.

Details

void upgradePassword(PasswordAuthenticatedUserInterface$user,string$newHashedPassword)

Upgrades the hashed password of a user, typically for using a better hash algorithm.

This method should persist the new password in the user storage and update the $user object accordingly. Because you don't want your users not being able to log in, this method should be opportunistic: it's fine if it does nothing or if it fails without throwing any exception.

Parameters

PasswordAuthenticatedUserInterface $user
string $newHashedPassword

Return Value

void