$passwordUpgrader =
$badge->
getPasswordUpgrader();
if (null ===
$passwordUpgrader) { if (!
$passport->
hasBadge(UserBadge::
class)) { return;
} /** @var UserBadge $userBadge */
$userBadge =
$passport->
getBadge(UserBadge::
class);
$userLoader =
$userBadge->
getUserLoader();
if (\
is_array($userLoader) &&
$userLoader[0
] instanceof PasswordUpgraderInterface
) { $passwordUpgrader =
$userLoader[0
];
} elseif (!
$userLoader instanceof \Closure
|| !
($passwordUpgrader =
(new \
ReflectionFunction($userLoader))->
getClosureThis()) instanceof PasswordUpgraderInterface
) { return;
} } $salt = null;
if ($user instanceof LegacyPasswordAuthenticatedUserInterface
) {