From 6a2b68a7a5ecd97a1e1ace6aaa5fdf7e9508028e Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 21 Mar 2007 00:18:38 +0000 Subject: added with no-user handling in User.pm git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@965 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Sysconfig.pm | 2 +- LedgerSMB/User.pm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3