'#description'=>t('If using the seamless login, a cookie is necessary to prevent automatic login after a user manually logs out. Select the lifetime of the cookie.'),
form_set_error('name',t('The name %name is registered using a reserved e-mail address and therefore could not be logged in.',array('%name'=>$account->name)));
}
// If there is any validations errors, we do not query LDAP.
if(form_get_errors())
return;
//Replace authentication with a lookup on the user's credentials. This is
//assuming that the webserver's authentication mechanism is a good enough
//Set a session variable, so elsewhere we can provide terms & conditions and the such
$_SESSION['new_account_created']=1;
watchdog('ldapauth','New external user %name created from the LDAP server %server.',array('%name'=>$name,'%server'=>$_ldapauth_ldap->getOption('name')),WATCHDOG_NOTICE,l(t('edit'),'user/'.$user->uid.'/edit'));
watchdog('ldapauth','LDAP user with DN %dn has a naming conflict with a local drupal user %name',array('%dn'=>$dn,'%name'=>$account->name),WATCHDOG_ERROR);
drupal_set_message(t('Another user already exists in the system with the same login name. You should contact the system administrator in order to solve this conflict.'),'error');