summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2005-09-07 12:48:24 +0000
committerivan <ivan>2005-09-07 12:48:24 +0000
commit598102bce2442157492847c7bf43abf8140edf9f (patch)
treea036c4b77b0e55e9b23820a144cc456db7c1b951 /httemplate
parent7740fe6ad808f8dd9b3ed157735a768073547a70 (diff)
fix silly bug sizing username field when adding an account (and usernamemax is not set)
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/svc_acct.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index 57227d4bc..a730531f5 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -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;