fix silly bug sizing username field when adding an account (and usernamemax is not...
authorivan <ivan>
Wed, 7 Sep 2005 12:48:24 +0000 (12:48 +0000)
committerivan <ivan>
Wed, 7 Sep 2005 12:48:24 +0000 (12:48 +0000)
httemplate/edit/svc_acct.cgi

index 57227d4..a730531 100755 (executable)
@@ -96,8 +96,10 @@ if ( $svc_acct->_password ) {
   $password = '';
 }
 
-my $ulen = $conf->config('usernamemax')
-           || dbdef->table('svc_acct')->column('username')->length;
+my $ulen = 
+  $conf->exists('usernamemax')
+  ? $conf->config('usernamemax')
+  : dbdef->table('svc_acct')->column('username')->length;
 my $ulen2 = $ulen+2;
 
 my $pmax = $conf->config('passwordmax') || 8;