diff options
-rwxr-xr-x | LedgerSMB.pm | 1 | ||||
-rwxr-xr-x | LedgerSMB/Auth/DB.pm | 8 | ||||
-rw-r--r-- | LedgerSMB/Sysconfig.pm | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 83a850bb..3fe186b9 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -375,7 +375,6 @@ sub format_amount { my $amount = $args{amount}; my $places = $args{precision}; my $dash = $args{neg_format}; - print STDERR "Formatting $amount in format $myconfig->{numberformat}\n"; my $negative; if ($amount) { diff --git a/LedgerSMB/Auth/DB.pm b/LedgerSMB/Auth/DB.pm index 5b582bd3..7febf0b1 100755 --- a/LedgerSMB/Auth/DB.pm +++ b/LedgerSMB/Auth/DB.pm @@ -29,6 +29,7 @@ #==================================================================== package LedgerSMB::Auth; use MIME::Base64; +use LedgerSMB::Sysconfig; use strict; sub session_check { @@ -232,6 +233,13 @@ sub get_credentials { $auth = MIME::Base64::decode($auth); my $return_value = {}; ($return_value->{login}, $return_value->{password}) = split(/:/, $auth); + if (defined $LedgerSMB::Sysconfig::force_username_case){ + if (lc($LedgerSMB::Sysconfig::force_username_case) eq 'lower'){ + $return_value->{login} = lc($return_value->{login}); + } elsif (lc($LedgerSMB::Sysconfig::force_username_case) eq 'upper'){ + $return_value->{login} = uc($return_value->{login}); + } + } return $return_value; diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index ed27c176..58267be8 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -17,6 +17,8 @@ $pathsep = ':'; $auth = 'DB'; $logging = 0; # No logging on by default +$force_username_case = undef; # don't force case + @io_lineitem_columns = qw(unit onhand sellprice discount linetotal); # Whitelist for redirect destination @@ -82,7 +84,7 @@ read_config( 'ledgersmb.conf' => %config ) or die; # Root variables for $var ( qw(pathsep logging check_max_invoices language auth latex - db_autoupdate) + db_autoupdate force_username_case) ) { ${$var} = $config{''}{$var} if $config{''}{$var}; |