public function UserServiceProvider::alter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/UserServiceProvider.php \Drupal\user\UserServiceProvider::alter()
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceModifierInterface::alter
File
- core/
modules/ user/ src/ UserServiceProvider.php, line 25 - Contains \Drupal\user\UserServiceProvider.
Class
- UserServiceProvider
- Swaps the original 'password' service in order to handle password hashing for user migrations that have passwords hashed to MD5.
Namespace
Drupal\userCode
public function alter(ContainerBuilder $container) {
$container
->setDefinition('password_original', $container
->getDefinition('password'));
$container
->setDefinition('password', $container
->getDefinition('password_migrate'));
}