version 1.137, 2006/11/23 00:04:09
|
version 1.138, 2006/11/23 00:53:19
|
Line 216 END
|
Line 216 END
|
# =================================================================== Phase two |
# =================================================================== Phase two |
sub print_user_modification_page { |
sub print_user_modification_page { |
my $r=shift; |
my $r=shift; |
my $ccuname=$env{'form.ccuname'}; |
my $ccuname =&LONCAPA::clean_username($env{'form.ccuname'}); |
my $ccdomain=$env{'form.ccdomain'}; |
my $ccdomain=&LONCAPA::clean_domain($env{'form.ccdomain'}); |
|
|
$ccuname=~s/\W//g; |
|
$ccdomain=~s/\W//g; |
|
|
|
unless (($ccuname) && ($ccdomain)) { |
unless (($ccuname) && ($ccdomain)) { |
&print_username_entry_form($r); |
&print_username_entry_form($r); |
Line 238 sub print_user_modification_page {
|
Line 235 sub print_user_modification_page {
|
); |
); |
$loginscript = &Apache::loncommon::authform_header(%param); |
$loginscript = &Apache::loncommon::authform_header(%param); |
$authformkrb = &Apache::loncommon::authform_kerberos(%param); |
$authformkrb = &Apache::loncommon::authform_kerberos(%param); |
|
|
$ccuname=~s/\W//g; |
$ccuname =&LONCAPA::clean_username($ccuname); |
$ccdomain=~s/\W//g; |
$ccdomain=&LONCAPA::clean_domain($ccdomain); |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
my $dc_setcourse_code = ''; |
my $dc_setcourse_code = ''; |
my $nondc_setsection_code = ''; |
my $nondc_setsection_code = ''; |
Line 1029 sub update_user_data {
|
Line 1026 sub update_user_data {
|
$r->print($error.&mt('No login name specified').'.'.$end); |
$r->print($error.&mt('No login name specified').'.'.$end); |
return; |
return; |
} |
} |
if ( $env{'form.ccuname'} =~/\W/) { |
if ( $env{'form.ccuname'} ne |
|
&LONCAPA::clean_username($env{'form.ccuname'}) ) { |
$r->print($error.&mt('Invalid login name').'. '. |
$r->print($error.&mt('Invalid login name').'. '. |
&mt('Only letters, numbers, and underscores are valid').'.'. |
&mt('Only letters, numbers, and underscores are valid').'.'. |
$end); |
$end); |
Line 1039 sub update_user_data {
|
Line 1037 sub update_user_data {
|
$r->print($error.&mt('No domain specified').'.'.$end); |
$r->print($error.&mt('No domain specified').'.'.$end); |
return; |
return; |
} |
} |
if ( $env{'form.ccdomain'} =~/\W/) { |
if ( $env{'form.ccdomain'} ne |
|
&LONCAPA::clean_domain($env{'form.ccdomain'}) ) { |
$r->print($error.&mt ('Invalid domain name').'. '. |
$r->print($error.&mt ('Invalid domain name').'. '. |
&mt('Only letters, numbers, and underscores are valid').'.'. |
&mt('Only letters, numbers, periods, dashes, and underscores are valid').'.'. |
$end); |
$end); |
return; |
return; |
} |
} |