diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 21:31:56 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 21:31:56 +0000 |
commit | 9e80fcdc9cba524a7407f01c92a0e6188247c7df (patch) | |
tree | acf66c7c72ff21160fc4362127f9be5e592e767a /LedgerSMB | |
parent | 3cdcd38e07dca6144810471489cf66c4341b0e20 (diff) |
Handling missing login values
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1906 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/User.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 659ad7e1..0f2f0ec4 100644 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -170,8 +170,10 @@ sub fetch_config { my $login = $lsmb->{login}; my $dbh = $lsmb->{dbh}; - if ( !$login ) { - &error( $self, "Access Denied" ); + if ( !$login ) { # Assume this is for current connected user + my $sth = $dbh->prepare('SELECT SESSION_USER'); + $sth->execute(); + ($login) = $sth->fetchrow_array(); } $query = qq| |