diff options
-rw-r--r-- | LedgerSMB/Sysconfig.pm | 2 | ||||
-rwxr-xr-x | LedgerSMB/User.pm | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index 2c66a75f..54370ab1 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -88,7 +88,7 @@ $spool = $config{paths}{spool} if $config{paths}{spool}; $templates = $config{paths}{templates} if $config{paths}{templates}; $tempdir = $config{paths}{tempdir} if $config{paths}{tempdir}; $userspath = ($config{paths}{userspath}) - ? $config($config{paths}{userspath}) : $tempdir; + ? $config{paths}{userspath} : $tempdir; $gzip = $config{programs}{gzip} if $config{programs}{gzip}; $sendmail = $config{mail}{sendmail} if $config{mail}{sendmail}; diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 0d918640..3cf3e0e5 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -136,6 +136,9 @@ sub fetch_config { $fetchUserPrefs->execute($login); my $userHashRef = $fetchUserPrefs->fetchrow_hashref; + if (!$userHashRef) { + &error($self, "Access Denied"); + } while ( my ($key, $value) = each(%{$userHashRef}) ) { $myconfig{$key} = $value; |