- Issue created by @Aporie
- Merge request !143533682: Use routes to identify the correct forms to alter. → (Open) created by Aporie
If you have altered the path of user.reset and user.reset.login routes, then the custom logic in simple_pass_reset_form_user_form_alter won't apply, resulting in this module not working.
In a routeSubscriber:
if ($route = $collection->get('user.reset')) {
$route->setPath('/whatever/reset/{uid}/{timestamp}/{hash}');
}
if ($route = $collection->get('user.reset.login')) {
$route->setPath('/whatever/reset/{uid}/{timestamp}/{hash}/login');
}
Then the following code won't apply:
if (isset($path_args[1], $path_args[2]) && $path_args[1] == 'user' && $path_args[2] == 'reset' && \Drupal::currentUser()->isAnonymous()) {
Using routes to identify the proper forms we want to alter.
Active
2.0
Code