title: Google API Client - Create user with another email
body: <p>I started using the php quickstart to connect and create users. Everything works, but cannot add a second email address.</p>
  
  <p>The help is confusing, and can't find an example.</p>
  
  <p>My code so far:</p>
  
  <pre><code>// Get the API client and construct the service object.
  $client = getClient();
  $service = new Google_Service_Directory($client);
  
  // USER DATA
  $userName = 'Test';
  $userSurname = 'User';
  $userDocument = '12345678';
  $userEmail = 'test@mail.com';
  
  $name = new Google_Service_Directory_UserName();
  $email = new Google_Service_Directory_UserEmail();
  $user = new Google_Service_Directory_User();
  
  // CREATE USER TO INSERT
  $name-&gt;setGivenName($userName);
  $name-&gt;setFamilyName($userSurname);
  $name-&gt;setFullName($userName . ' ' . $userSurname);
  
  $email-&gt;setAddress($userEmail);
  $email-&gt;setType('home');
  
  $user-&gt;setName($name);
  $user-&gt;setHashFunction('SHA-1');
  $user-&gt;setPassword(hash('sha1', $userDocument));
  $user-&gt;setPrimaryEmail($userName . '.' . $userSurname . '@domain.com');
  $user-&gt;setSuspended(false);
  $user-&gt;setChangePasswordAtNextLogin(true);
  $user-&gt;setEmails(array('address' =&gt; 'test@mail.com', 'type' =&gt; 'home',     'customType' =&gt; '', 'primary' =&gt; false)); // don't work
  // $user-&gt;setEmails($email); // don't work either
  $user-&gt;setOrgUnitPath('/org/path');
  
  try 
  { 
      $createUserResult = $service-&gt;users-&gt;insert($user); 
  }
  </code></pre>