Skip to content
Snippets Groups Projects
Commit 030eee0a authored by jurgenhaas's avatar jurgenhaas
Browse files

Add patch to name module

parent 5b110579
No related branches found
Tags v1.1.0
1 merge request!318Merging develop into main
......@@ -161,6 +161,9 @@
"drupal/menu_block": {
"#3082445 Add option to always render parent menu item": "https://www.drupal.org/files/issues/2020-10-12/menu_block-render-parent-3082445-26.patch"
},
"drupal/name": {
"#3478278 Name and IEF": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478278.diff"
},
"drupal/pluginreference": {
"#2979414 Allow no selection": "https://www.drupal.org/files/issues/2018-07-18/pluginreference-allow_no_plugin_to_be_selected-2979414-2.patch"
},
......
diff --git a/name.module b/name.module
index 25b1d1149d96d9597ca6f42a9edb42f3d03ea4a3..866af4d5aaa14d430b9a67bc4a9fb65112776360 100644
--- a/name.module
+++ b/name.module
@@ -144,7 +144,8 @@ function name_user_format_name_alter_preload($account) {
$field_name = Drupal::config('name.settings')->get('user_preferred');
if ($field_name && FieldConfig::loadByName('user', 'user', $field_name)) {
$in_preload = TRUE;
- $account = User::load($account->id());
+ $id = $account->id();
+ $account = $id ? User::load($id) : 'unknown';
$in_preload = FALSE;
}
}
......@@ -157,6 +157,9 @@
"drupal/menu_block": {
"#3082445 Add option to always render parent menu item": "https://www.drupal.org/files/issues/2020-10-12/menu_block-render-parent-3082445-26.patch"
},
"drupal/name": {
"#3478278 Name and IEF": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3478278.diff"
},
"drupal/pluginreference": {
"#2979414 Allow no selection": "https://www.drupal.org/files/issues/2018-07-18/pluginreference-allow_no_plugin_to_be_selected-2979414-2.patch"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment