summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/AM.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm
index b3e94bbb..91df2123 100755
--- a/LedgerSMB/AM.pm
+++ b/LedgerSMB/AM.pm
@@ -1329,11 +1329,10 @@ sub save_preferences {
# update name
$query = qq|
UPDATE employee
- SET name = ?,
- role = ?
+ SET name = ?
WHERE login = ?|;
- @queryargs = ($form->{name}, $form->{role}, $form->{login});
+ @queryargs = ($form->{name}, $form->{login});
$dbh->prepare($query)->execute(@queryargs) || $form->dberror($query);
# get default currency
@@ -1351,9 +1350,10 @@ sub save_preferences {
my $myconfig = LedgerSMB::User->new($form->{login});
- foreach my $item (keys %$form) {
- $myconfig->{$item} = $form->{$item};
- }
+ map {$myconfig->{$_} = $form->{$_} if exists $form->{$_}}
+ qw(name email dateformat signature numberformat vclimit tel fax
+ company menuwidth countrycode address timeout stylesheet
+ printer password);
$myconfig->{password} = $form->{new_password} if ($form->{old_password} ne $form->{new_password});