summaryrefslogtreecommitdiff
path: root/LedgerSMB/User.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/User.pm')
-rw-r--r--LedgerSMB/User.pm6
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|