--- loncom/auth/lonauth.pm 2008/07/10 00:26:40 1.93
+++ loncom/auth/lonauth.pm 2008/07/13 00:51:31 1.94
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.93 2008/07/10 00:26:40 raeburn Exp $
+# $Id: lonauth.pm,v 1.94 2008/07/13 00:51:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -298,32 +298,15 @@ sub handler {
&Apache::loncommon::build_recipient_list(undef,'helpdeskmail',
$form{'udom'},$origmail);
my ($contact_email) = split(',',$contacts);
- my ($output,$checkfail) =
- &Apache::createaccount::username_check($form{'uname'},$form{'udom'},
- $domdesc,undef,$lonhost,
- $contact_email);
+ my $output = &Apache::createaccount::username_check($form{'uname'},
+ $form{'udom'},$domdesc,'',
+ $lonhost,$contact_email,$contact_name);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
&Apache::createaccount::print_header($r,$start_page);
- my $msg = '
'.&mt('Account creation').'
'.
- ''.&mt('Although your username and password were authenticated, you do not currently have a LON-CAPA account in this domain.').'
';
- if ($checkfail) {
- $msg .= ''.&mt('Account creation unavailable').'
';
- if ($checkfail eq 'username') {
- $msg .= ''.
- &mt('A LON-CAPA account may not be created with the username you use.').'';
- } elsif ($checkfail eq 'authtoken') {
- $msg .= ''.&mt('Error creating token.').'';
- }
- &Apache::lonnet::logthis("ERROR: failure type of '$checkfail' when performing username check to create account for authenticated user: $form{'uname'}, in domain $form{'udom'}");
- $msg .= '
'.
- &mt('Please contact the [_1] ([_2]) for assistance.',
- $contact_name,$contact_email);
- } else {
- $msg .= &mt('To create one, use the table below to provide information about yourself (if appropriate), then click the "Create LON-CAPA account" button.');
- }
- $r->print($msg.$output);
- $r->print(&Apache::loncommon::end_page());
+ $r->print(''.&mt('Account creation').'
'.
+ &mt('Although your username and password were authenticated, you do not currently have a LON-CAPA account at this institution.').'
'.
+ $output.&Apache::loncommon::end_page());
return OK;
} else {
&failed($r,'Although your username and password were authenticated, you do not currently have a LON-CAPA account in this domain, and you are not permitted to create one.',\%form);