Answers.Body: <p>By default CiviCRM comes with a profile called 'Name and Address' which is set to be used for User Registration. First Name and Last Name fields in this profile are, again by default, set as required fields. So when a site visitor goes to user/register they need not only to provide a username/email address/password, but they also see the fields exposed in the Name and Address profile and must provide First/Last name. Maybe you've disabled or removed this profile? Or you can create a new profile that's used for user registration.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-27T13:38:21.347Z
Answers.LastActivityDate: 2017-10-27T13:38:21.347Z
Answers.UserDisplayName: Graham
Body: <p>During Drupal's normal user registration process (a user registering their own self, as opposed to an admin registering a user) a Civi contact record is created for that user.  That works fine but the only data set for the contact record is the email address.  How do I set it up so that the contact's First and Last Names are set during that process?</p>
  
  <p>Currently I have fields on the user profile for first and last names.  Is there a hook I can use to save these values to the contact record?</p>
  
  <p>I don't see any configuration options for this sort of thing.  I'm kind of mystified by the lack of info on this particular use case when I search the web, as it seems like a standard scenario.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-27T09:15:18.117Z
Comments.Text: By default CiviCRM comes with a profile called 'Name and Address' which is set to be used for User Registration. First Name and Last Name fields in this profile are, again by default, set as required fields. So when a site visitor goes to user/register they need not only to provide a username/email address/password, but they also see the fields exposed in the Name and Address profile and must provide First/Last name. Maybe you've disabled or removed this profile? Or you can create a new profile that's used for user registration.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-27T12:24:48.380Z
Comments.Text: Thanks Graham!  Indeed, the developer who started this project disabled that default profile; using a profile for user registration does work.  As an alternate approach are there hooks available for this sort of thing?
Comments.UserDisplayName: alec
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-27T12:25:07.930Z
Comments.Text: And feel free to post an answer for me to accept if you'd like the points :)
Comments.UserDisplayName: alec
Tags: <contacts><user-account>
Title: How to set contact name during Drupal's user registration?
ThreadText: # How to set contact name during Drupal's user registration?
  
  (Asked by: username_0 on 2017-10-27)
  
  During Drupal's normal user registration process (a user registering their own self, as opposed to an admin registering a user) a Civi contact record is created for that user. That works fine but the only data set for the contact record is the email address. How do I set it up so that the contact's First and Last Names are set during that process?
  
  Currently I have fields on the user profile for first and last names. Is there a hook I can use to save these values to the contact record?
  
  I don't see any configuration options for this sort of thing. I'm kind of mystified by the lack of info on this particular use case when I search the web, as it seems like a standard scenario.
  
  **Tags:** contacts, user-account
  
  > **Comments:**
  > **username_1**: By default CiviCRM comes with a profile called 'Name and Address' which is set to be used for User Registration. First Name and Last Name fields in this profile are, again by default, set as required fields. So when a site visitor goes to user/register they need not only to provide a username/email address/password, but they also see the fields exposed in the Name and Address profile and must provide First/Last name. Maybe you've disabled or removed this profile? Or you can create a new profile that's used for user registration.  
  > **username_0**: Thanks username_1!  Indeed, the developer who started this project disabled that default profile; using a profile for user registration does work.  As an alternate approach are there hooks available for this sort of thing?  
  > **username_0**: And feel free to post an answer for me to accept if you'd like the points :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-27. Score: 1 | Accepted answer
  
  By default CiviCRM comes with a profile called 'Name and Address' which is set to be used for User Registration. First Name and Last Name fields in this profile are, again by default, set as required fields. So when a site visitor goes to user/register they need not only to provide a username/email address/password, but they also see the fields exposed in the Name and Address profile and must provide First/Last name. Maybe you've disabled or removed this profile? Or you can create a new profile that's used for user registration.
  
  
  ---
  
  