summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/User.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index 95f3fc4f..7eb58a45 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -804,9 +804,8 @@ sub save_member {
# add login to employee table if it does not exist
my $login = $self->{login};
$login =~ s/@.*//;
- my $query = qq|SELECT id FROM employee WHERE login = '$login'|;
- my $sth = $dbh->prepare($query);
- $sth->execute;
+ my $sth = $dbh->prepare("SELECT id FROM employee WHERE login = ?;");
+ $sth->execute($login);
my ($id) = $sth->fetchrow_array;
$sth->finish;