Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / user_presave.twig
1 /**
2  * Implements hook_user_presave().
3  */
4 function {{ machine_name }}_user_presave(&$edit, $account, $category) {
5   // Make sure that our form value 'mymodule_foo' is stored as
6   // 'mymodule_bar' in the 'data' (serialized) column.
7   if (isset($edit['mymodule_foo'])) {
8     $edit['data']['mymodule_bar'] = $edit['mymodule_foo'];
9   }
10 }