Diff for /loncom/interface/createaccount.pm between versions 1.37.2.3 and 1.37.2.4

version 1.37.2.3, 2010/11/29 15:13:08 version 1.37.2.4, 2010/12/01 22:56:12
Line 520  sub process_email_request { Line 520  sub process_email_request {
             my $uhome = &Apache::lonnet::homeserver($useremail,$domain);              my $uhome = &Apache::lonnet::homeserver($useremail,$domain);
             if ($uhome ne 'no_host') {              if ($uhome ne 'no_host') {
                 $output = &invalid_state('existinguser',$domdesc,                  $output = &invalid_state('existinguser',$domdesc,
                                          $contact_name,$contact_email);                                           $contact_name,$contact_email,'',$useremail);
                 return $output;                  return $output;
             } else {              } else {
                  my $captcha = Captcha::reCAPTCHA->new;                   my $captcha = Captcha::reCAPTCHA->new;
Line 1129  sub check_id { Line 1129  sub check_id {
 }  }
   
 sub invalid_state {  sub invalid_state {
     my ($error,$domdesc,$contact_name,$contact_email,$msgtext) = @_;      my ($error,$domdesc,$contact_name,$contact_email,$msgtext,$useremail) = @_;
     my $msg = '<h3>'.&mt('Account creation unavailable').'</h3><span class="LC_error">';      my $msg = '<h3>'.&mt('Account creation unavailable').'</h3><span class="LC_error">';
     if ($error eq 'baduseremail') {      if ($error eq 'baduseremail') {
         $msg .= &mt('The e-mail address you provided does not appear to be a valid address.');          $msg .= &mt('The e-mail address you provided does not appear to be a valid address.');
     } elsif ($error eq 'existinguser') {      } elsif ($error eq 'existinguser') {
         $msg .= &mt('The e-mail address you provided is already in use as a username in LON-CAPA at this institution.');          my $uname = &HTML::Entities::encode($useremail);
           $msg .= &mt('The e-mail address you provided is already in use as a username in LON-CAPA at this institution.').'<br />'.&mt('You can either:').'<ul>'.
                   '<li>'.&mt(Return to the [_1]log-in page[_2] and enter your password.','<a href="/adm/login?username="'.$uname.'">','</a>').'</li>'.
                   '<li>'.&mt('or, if you do not remember your password, visit the "[_1]Forgot your password?[_2]" page.','<a href="/adm/resetpw?uname="'.$uname.'&useremail='.$uname.'&referrer=createaccount">','</a>');
     } elsif ($error eq 'userrules') {      } elsif ($error eq 'userrules') {
         $msg .= &mt('Username rules at this institution do not allow the e-mail address you provided to be used as a username.');          $msg .= &mt('Username rules at this institution do not allow the e-mail address you provided to be used as a username.');
     } elsif ($error eq 'userformat') {      } elsif ($error eq 'userformat') {
         $msg .= &mt('The e-mail address you provided may not be used as a username at this LON-CAPA institution.');          $msg .= &mt('The e-mail address you provided may not be used as a username at this LON-CAPA institution.');
     } elsif ($error eq 'captcha') {      } elsif ($error eq 'captcha') {
         $msg .= &mt('Validation of the code your entered failed.');          $msg .= &mt('Validation of the code you entered failed.');
     } elsif ($error eq 'noemails') {      } elsif ($error eq 'noemails') {
         $msg .= &mt('Creation of a new user account using an e-mail address as username is not permitted at this LON-CAPA institution.');          $msg .= &mt('Creation of a new user account using an e-mail address as username is not permitted at this LON-CAPA institution.');
     }      }

Removed from v.1.37.2.3  
changed lines
  Added in v.1.37.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>