[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1304] trunk
- Subject: SF.net SVN: ledger-smb: [1304] trunk
- From: ..hidden..
- Date: Fri, 22 Jun 2007 10:33:11 -0700
Revision: 1304
http://svn.sourceforge.net/ledger-smb/?rev=1304&view=rev
Author: einhverfr
Date: 2007-06-22 10:33:11 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
Fixing ..hidden.. logins
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
trunk/LedgerSMB/User.pm
trunk/bin/admin.pl
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2007-06-22 06:28:26 UTC (rev 1303)
+++ trunk/LedgerSMB/Form.pm 2007-06-22 17:33:11 UTC (rev 1304)
@@ -75,9 +75,8 @@
$self->{nextsub} = lc $self->{nextsub};
$self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g;
}
+ $self->{login} =~ s/[^a-zA-Z0-9._+\@'-]//g;
- $self->{login} =~ s/[^a-zA-Z0-9._+@'-]//g;
-
$self->{menubar} = 1 if $self->{path} =~ /lynx/i;
#menubar will be deprecated, replaced with below
Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm 2007-06-22 06:28:26 UTC (rev 1303)
+++ trunk/LedgerSMB/User.pm 2007-06-22 17:33:11 UTC (rev 1304)
@@ -212,7 +212,7 @@
# 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 @@
$form->update_defaults( \%myconfig, "employeenumber", $dbh );
$query = qq|
- INSERT INTO employees
+ INSERT INTO employee
(login, employeenumber, name,
workphone, role)
VALUES (?, ?, ?, ?, ?)|;
@@ -858,7 +858,7 @@
# 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 @@
my @values;
if ($id) {
- $query = qq|UPDATE employees SET
+ $query = qq|UPDATE employee SET
role = ?,
email = ?,
name = ?
@@ -881,7 +881,7 @@
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 @@
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 @@
$sth->finish;
my $query = qq|
- UPDATE employees
+ UPDATE employee
SET login = NULL,
enddate = current_date
WHERE login = ?|;
Modified: trunk/bin/admin.pl
===================================================================
--- trunk/bin/admin.pl 2007-06-22 06:28:26 UTC (rev 1303)
+++ trunk/bin/admin.pl 2007-06-22 17:33:11 UTC (rev 1304)
@@ -785,7 +785,6 @@
# check for duplicates
if ( !$form->{edit} ) {
-
$temp = LedgerSMB::User->new( $form->{login} );
if ( $temp->{login} ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.