From c37bad1cccae9bccb9acbd4a32ce03fa1d33893c Mon Sep 17 00:00:00 2001 From: thewilkybarkid <chriswilkinson84@gmail.com> Date: Thu, 15 Aug 2013 09:32:01 +0100 Subject: [PATCH] Give the admin user a real name. Fixes #2 --- cambridge.install | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/cambridge.install b/cambridge.install index 2b4ba74..b0bed3a 100644 --- a/cambridge.install +++ b/cambridge.install @@ -166,6 +166,40 @@ function cambridge_install() { variable_set('realname_pattern', '[user:field_user_name]'); + // Give the admin user a real name. + + db_insert('field_data_field_user_name') + ->fields( + array( + 'entity_type' => 'user', + 'bundle' => 'user', + 'deleted' => 0, + 'entity_id' => 1, + 'revision_id' => 1, + 'language' => 'und', + 'delta' => 0, + 'field_user_name_value' => 'Administrator', + 'field_user_name_format' => NULL, + ) + ) + ->execute(); + + db_insert('field_revision_field_user_name') + ->fields( + array( + 'entity_type' => 'user', + 'bundle' => 'user', + 'deleted' => 0, + 'entity_id' => 1, + 'revision_id' => 1, + 'language' => 'und', + 'delta' => 0, + 'field_user_name_value' => 'Administrator', + 'field_user_name_format' => NULL, + ) + ) + ->execute(); + // Transliterate Pathauto aliases. variable_set('pathauto_transliterate', 1); -- GitLab