title: How do you register a new user (with attributes) in Hyperledger Fabric Client (HFC)?
body: <p>I am reviewing the sample code for the HFC SDK and saw ways to manage users.</p>
  
  <p>To enroll an existing user the following function is used:</p>
  
  <pre><code>chain.enroll
  </code></pre>
  
  <p>To register and enroll a new user the following function is used:</p>
  
  <pre><code>chain.registerAndEnroll
  </code></pre>
  
  <p>However, the sample code did not provide an example for a register only function:</p>
  
  <pre><code>chain.register
  </code></pre>
  
  <p>If I understand it correctly both the chain.enroll and chain.registerAndEnroll will both save the user key/certificate in the machine where the functions are called.</p>
  
  <p>If I want an admin to create a new user (e.g., userA), I cannot use the chain.registerAndEnroll function since the key/certificate will be saved in the admin's machine instead of userA's machine since the function performs not only a register but also an enroll.  Hence, my need for a register only function.</p>
  
  <p>In addition, how do I add attributes to users using HFC similar to the attributes that can be defined in membersrvc.yaml?</p>