diff options
author | ivan <ivan> | 2005-09-07 12:48:24 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-09-07 12:48:24 +0000 |
commit | 598102bce2442157492847c7bf43abf8140edf9f (patch) | |
tree | a036c4b77b0e55e9b23820a144cc456db7c1b951 /httemplate | |
parent | 7740fe6ad808f8dd9b3ed157735a768073547a70 (diff) |
fix silly bug sizing username field when adding an account (and usernamemax is not set)
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/svc_acct.cgi | 6 |
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; |