Index: ldapauth.module
===================================================================
--- ldapauth.module     (revision 8522)
+++ ldapauth.module     (working copy)
@@ -959,7 +959,7 @@

   $config_name = $ldapauth_ldap->getOption('name');
   $userinfo = array('mail' => $mail, 'ldap_dn' => $dn, 'ldap_config' => $config_name);
-  user_save($user, $userinfo);
+  $user = user_save($user, $userinfo);

   // obtain the DN for this user in this specific LDAP repository
   $_SESSION['ldap_login']['dn'] = $dn;
