Diff for /loncom/interface/loncreateuser.pm between versions 1.182 and 1.184.2.1

version 1.182, 2007/08/31 17:58:47 version 1.184.2.1, 2007/10/03 13:45:58
Line 1014  END Line 1014  END
             $loginscript  = &Apache::loncommon::authform_header(%param);              $loginscript  = &Apache::loncommon::authform_header(%param);
  }   }
  # Check for a bad authentication type   # Check for a bad authentication type
         unless ($currentauth=~/^krb(4|5):/ or          if ($currentauth !~ /^(krb4|krb5|unix|internal|localauth):/) { 
  $currentauth=~/^unix:/ or              # bad authentication scheme
  $currentauth=~/^internal:/ or  
  $currentauth=~/^localauth:/  
  ) { # bad authentication scheme  
     if (&Apache::lonnet::allowed('mau',$ccdomain)) {      if (&Apache::lonnet::allowed('mau',$ccdomain)) {
                 &initialize_authen_forms();                  &initialize_authen_forms();
  my %lt=&Apache::lonlocal::texthash(   my %lt=&Apache::lonlocal::texthash(
Line 1113  $lt{'yodo'} $lt{'ifch'}: $ccdomain Line 1110  $lt{'yodo'} $lt{'ifch'}: $ccdomain
 ENDNOPRIV  ENDNOPRIV
                 }                   } 
             }              }
             if (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {  
                 # Current user has quota modification privileges  
                 $r->print(&portfolio_quota($ccuname,$ccdomain));  
             }  
         }  ## End of "check for bad authentication type" logic          }  ## End of "check for bad authentication type" logic
           if (&Apache::lonnet::allowed('mpq',$ccdomain)) {
               # Current user has quota modification privileges
               $r->print(&portfolio_quota($ccuname,$ccdomain));
           } elsif (&Apache::lonnet::allowed('mpq',$env{'request.role.domain'})) {
               my %lt=&Apache::lonlocal::texthash(
                   'dska'  => "Disk space allocated to user's portfolio files",
                   'youd'  => "You do not have privileges to modify the portfolio quota for this user.",
                   'ichr'  => "If a change is required, contact a domain coordinator for the domain",
               );
               $r->print(<<ENDNOPORTPRIV);
   <hr />
   <h3>$lt{'dska'}</h3>
   $lt{'youd'} $lt{'ichr'}: $ccdomain
   ENDNOPORTPRIV
           }
     } ## End of new user/old user logic      } ## End of new user/old user logic
     $r->print('<hr /><h3>'.&mt('Add Roles').'</h3>');      $r->print('<hr /><h3>'.&mt('Add Roles').'</h3>');
 #  #
Line 1359  sub update_user_data { Line 1367  sub update_user_data {
     ($env{'form.ccdomain'},$env{'form.ccuname'},$env{'form.cstid'},      ($env{'form.ccdomain'},$env{'form.ccuname'},$env{'form.cstid'},
              $amode,$genpwd,$env{'form.cfirst'},               $amode,$genpwd,$env{'form.cfirst'},
              $env{'form.cmiddle'},$env{'form.clast'},$env{'form.cgen'},               $env{'form.cmiddle'},$env{'form.clast'},$env{'form.cgen'},
              undef,$desiredhost               undef,$desiredhost,$env{'form.cemail'}
      );       );
  $r->print(&mt('Generating user').': '.$result);   $r->print(&mt('Generating user').': '.$result);
         my $home = &Apache::lonnet::homeserver($env{'form.ccuname'},          my $home = &Apache::lonnet::homeserver($env{'form.ccuname'},
Line 2214  sub user_search_result { Line 2222  sub user_search_result {
     my %inst_matches;      my %inst_matches;
     my %srch_results;      my %srch_results;
     my ($response,$currstate,$forcenewuser,$dirsrchres);      my ($response,$currstate,$forcenewuser,$dirsrchres);
     $srch->{'srchterm'} =~ s/^\s+//;      $srch->{'srchterm'} =~ s/\s+/ /g;
     $srch->{'srchterm'} =~ s/\s+$//;  
   
     if ($srch->{'srchby'} !~ /^(uname|lastname|lastfirst)$/) {      if ($srch->{'srchby'} !~ /^(uname|lastname|lastfirst)$/) {
         $response = &mt('Invalid search.');          $response = &mt('Invalid search.');
     }      }
Line 2229  sub user_search_result { Line 2235  sub user_search_result {
     if ($srch->{'srchterm'} eq '') {      if ($srch->{'srchterm'} eq '') {
         $response = &mt('You must enter a search term.');          $response = &mt('You must enter a search term.');
     }      }
       if ($srch->{'srchterm'} =~ /^\s+$/) {
           $response = &mt('Your search term must contain more than just spaces.');
       }
     if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'instd')) {      if (($srch->{'srchin'} eq 'dom') || ($srch->{'srchin'} eq 'instd')) {
         if (($srch->{'srchdomain'} eq '') ||           if (($srch->{'srchdomain'} eq '') || 
     ! (&Apache::lonnet::domain($srch->{'srchdomain'}))) {      ! (&Apache::lonnet::domain($srch->{'srchdomain'}))) {

Removed from v.1.182  
changed lines
  Added in v.1.184.2.1


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