--- loncom/auth/lonauth.pm 2008/07/10 00:26:40 1.93
+++ loncom/auth/lonauth.pm 2009/04/01 14:43:19 1.97
@@ -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.97 2009/04/01 14:43:19 hauer Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -126,7 +126,7 @@ sub failed {
$r->print(
$start_page
.'
'.&mt('Sorry ...').'
'
- .''.&mt($message).'
'
+ .''.&mt($message).'
'
.''.&mt('Please [_1]log in again[_2].'
,"{'uname'}&domain=$form->{'udom'}\">",'')
.'
'
@@ -172,7 +172,7 @@ sub handler {
$r->print(
$start_page
.''.&mt('You are already logged in!').'
'
- .''.&mt('Please either [_1]continue the current session[_2] or [_3]logout[_4].'
+ .'
'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].'
,'','','','')
.'
'
.''.&mt('Login problems?').'
'
@@ -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);