Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
3127432a
Commit
3127432a
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge pull request #4987 from marcosgdf/bug-4874
FIX #4874 SQL error when listing users
parents
507b9a29
7acbf1dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/user/index.php
+4
-1
4 additions, 1 deletion
htdocs/user/index.php
with
4 additions
and
1 deletion
htdocs/user/index.php
+
4
−
1
View file @
3127432a
...
...
@@ -3,6 +3,7 @@
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -201,7 +202,9 @@ if ($search_login != '') $sql.= natural_search("u.login", $search_login);
if
(
$search_lastname
!=
''
)
$sql
.
=
natural_search
(
"u.lastname"
,
$search_lastname
);
if
(
$search_firstname
!=
''
)
$sql
.
=
natural_search
(
"u.firstname"
,
$search_firstname
);
if
(
$search_gender
!=
''
&&
$search_gender
!=
'-1'
)
$sql
.
=
" AND u.gender = '"
.
$search_gender
.
"'"
;
if
(
$search_employee
>=
0
)
$sql
.
=
natural_search
(
"u.employee"
,
$search_employee
);
if
(
is_numeric
(
$search_employee
)
&&
$search_employee
>=
0
)
{
$sql
.
=
' AND u.employee = '
.
(
int
)
$search_employee
;
}
if
(
$search_accountancy_code
!=
''
)
$sql
.
=
natural_search
(
"u.accountancy_code"
,
$search_accountancy_code
);
if
(
$search_email
!=
''
)
$sql
.
=
natural_search
(
"u.email"
,
$search_email
);
if
(
$search_statut
!=
''
&&
$search_statut
>=
0
)
$sql
.
=
" AND (u.statut="
.
$search_statut
.
")"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment