Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294944

Move user timezone code from system.module form alters to user form controllers

$
0
0

The functions system_form_user_form_alter(), system_form_user_register_form_alter(), system_user_presave() and system_user_timezone() should be moved into user form controllers.

Make the last one a helper method in AccountFormController and then move the config checks of the first two into Profile/RegisterFormController.

Note that the configuration objects will need to be injected, override __construct() and createInstance() of the base EntityFormController class and pass in the config factory service (see e.g. BlockListController for an example), and then use $this->configFactory->get() to access the configuration. If you're not sure about this part, leave it out for now.

Also, system_user_login should probably be merged directly into the code that logs the user in.


Viewing all articles
Browse latest Browse all 294944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>