FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit a444e948 authored by thewilkybarkid's avatar thewilkybarkid
Browse files

Add a name field to users and use it in the Real Name module

parent 41add813
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ dependencies[] = media
dependencies[] = pathauto
dependencies[] = php
dependencies[] = raven
dependencies[] = realname
dependencies[] = redirect
dependencies[] = token
dependencies[] = views
......
......@@ -116,4 +116,51 @@ function cambridge_install() {
field_update_instance($instance);
}
$field = array(
'field_name' => 'field_user_name',
'label' => st('Name'),
'cardinality' => 1,
'type' => 'text',
'settings' => array(
'max_length' => 255,
),
);
field_create_field($field);
$instance = array(
'entity_type' => 'user',
'bundle' => 'user',
'field_name' => 'field_user_name',
'label' => st('Name'),
'description' => st('The user\'s real name.'),
'required' => 1,
'cardinality' => 1,
'type' => 'field_user_name',
'settings' => array(
'size' => 60,
'text_processing' => 0,
'user_register_form' => 1,
),
'widget' => array(
'weight' => -11,
),
'display' => array(
'default' => array(
'label' => 'inline',
'type' => 'text_plain',
'weight' => 1,
),
'teaser' => array(
'label' => 'inline',
'type' => 'text_plain',
'weight' => 1,
),
),
);
field_create_instance($instance);
variable_set('realname_pattern', '[user:field_user_name]');
}
......@@ -19,4 +19,5 @@ projects[globalredirect] = "1.5"
projects[google_analytics] = "1.3"
projects[imagecrop] = "1.0-rc3"
projects[media] = "1.3"
projects[realname] = "1.1"
projects[redirect] = "1.0-rc1"
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