summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject/User.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/DBObject/User.pm')
-rw-r--r--LedgerSMB/DBObject/User.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/LedgerSMB/DBObject/User.pm b/LedgerSMB/DBObject/User.pm
index 18bfca9a..7682acbe 100644
--- a/LedgerSMB/DBObject/User.pm
+++ b/LedgerSMB/DBObject/User.pm
@@ -74,15 +74,19 @@ sub get {
funcname=>'person__list_locations',
args=>[ $self->{user}->{entity_id} ]
);
- $self->{location} = \@loc;
+ $self->{locations} = \@loc;
my @contacts = $self->exec_method(
funcname=>"person__list_contacts",
args=>[$self->{user}->{entity_id} ]
);
+ $self->{contacts} = \@contacts;
my @rolstore;
for my $role (@roles) {
- push @rolstore, $role->{'admin__get_roles_for_user'}; # Only one key=>value pair
+ my $rolname = $role->{'admin__get_roles_for_user'};
+ my $company = $self->{company};
+ $rolname =~ s/lsmb_${company}__//gi;
+ push @rolstore, $rolname; # Only one key=>value pair
}
$self->{roles} = \@rolstore;