[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [965] branches/1.2/LedgerSMB



Revision: 965
          http://svn.sourceforge.net/ledger-smb/?rev=965&view=rev
Author:   einhverfr
Date:     2007-03-20 17:18:38 -0700 (Tue, 20 Mar 2007)

Log Message:
-----------
added with no-user handling in User.pm

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Sysconfig.pm
    branches/1.2/LedgerSMB/User.pm

Modified: branches/1.2/LedgerSMB/Sysconfig.pm
===================================================================
--- branches/1.2/LedgerSMB/Sysconfig.pm	2007-03-21 00:10:55 UTC (rev 964)
+++ branches/1.2/LedgerSMB/Sysconfig.pm	2007-03-21 00:18:38 UTC (rev 965)
@@ -88,7 +88,7 @@
 $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};

Modified: branches/1.2/LedgerSMB/User.pm
===================================================================
--- branches/1.2/LedgerSMB/User.pm	2007-03-21 00:10:55 UTC (rev 964)
+++ branches/1.2/LedgerSMB/User.pm	2007-03-21 00:18:38 UTC (rev 965)
@@ -136,6 +136,9 @@
 	$fetchUserPrefs->execute($login);
 
 	my $userHashRef = $fetchUserPrefs->fetchrow_hashref;
+	if (!$userHashRef) {
+		&error($self, "Access Denied");
+	}
 
 	while ( my ($key, $value) = each(%{$userHashRef}) ) {
 		$myconfig{$key} = $value;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.