--- loncom/Attic/lcuseradd 2002/05/03 03:43:54 1.21 +++ loncom/Attic/lcuseradd 2002/09/16 13:27:40 1.22 @@ -18,7 +18,7 @@ # o LonCapa will add it if/when the user is granted an Author # role. # -# $Id: lcuseradd,v 1.21 2002/05/03 03:43:54 foxr Exp $ +# $Id: lcuseradd,v 1.22 2002/09/16 13:27:40 foxr Exp $ ### ############################################################################### @@ -162,10 +162,14 @@ else { } my ($username,$password1,$password2)=@input; +print "Username = ".$username unless $noprint; $username=~/^(\w+)$/; +print "Username after substitution - ".$username unless $noprint; my $safeusername=$1; +print "Safe username = $safeusername" unless $noprint; + if (($username ne $safeusername) or ($safeusername!~/^[A-Za-z]/)) { - print "Error. The user name specified has invalid characters.\n" + print "Error. The user name specified $username $safeusername has invalid characters.\n" unless $noprint; unlink('/tmp/lock_lcpasswd'); exit 9;