diff options
Diffstat (limited to 'LedgerSMB/User.pm')
-rw-r--r-- | LedgerSMB/User.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index e9600deb..f38251a0 100644 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -212,7 +212,7 @@ sub login { # no error check for employee table, ignore if it does not exist my $login = $self->{login}; $login =~ s/@.*//; - $query = qq|SELECT id FROM employees WHERE login = ?|; + $query = qq|SELECT id FROM employee WHERE login = ?|; $sth = $dbh->prepare($query); $sth->execute($login); @@ -224,7 +224,7 @@ sub login { $form->update_defaults( \%myconfig, "employeenumber", $dbh ); $query = qq| - INSERT INTO employees + INSERT INTO employee (login, employeenumber, name, workphone, role) VALUES (?, ?, ?, ?, ?)|; @@ -858,7 +858,7 @@ sub save_member { # add login to employees table if it does not exist my $login = $self->{login}; $login =~ s/@.*//; - my $sth = $dbh->prepare("SELECT id FROM employees WHERE login = ?;"); + my $sth = $dbh->prepare("SELECT id FROM employee WHERE login = ?;"); $sth->execute($login); my ($id) = $sth->fetchrow_array; @@ -867,7 +867,7 @@ sub save_member { my @values; if ($id) { - $query = qq|UPDATE employees SET + $query = qq|UPDATE employee SET role = ?, email = ?, name = ? @@ -881,7 +881,7 @@ sub save_member { my ($employeenumber) = Form::update_defaults( "", \%$self, "employeenumber", $dbh ); $query = qq| - INSERT INTO employees + INSERT INTO employee (login, employeenumber, name, workphone, role, email, sales) VALUES (?, ?, ?, ?, ?, ?, '1')|; @@ -911,7 +911,7 @@ sub delete_login { my $login = $form->{login}; $login =~ s/@.*//; - my $query = qq|SELECT id FROM employees WHERE login = ?|; + my $query = qq|SELECT id FROM employee WHERE login = ?|; my $sth = $dbh->prepare($query); $sth->execute($login) || $form->dberror( __FILE__ . ':' . __LINE__ . ': ' . $query ); @@ -920,7 +920,7 @@ sub delete_login { $sth->finish; my $query = qq| - UPDATE employees + UPDATE employee SET login = NULL, enddate = current_date WHERE login = ?|; |