Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
306
Merge Requests
306
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
9796455a
Commit
9796455a
authored
Apr 21, 2004
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#4635
by Ber: user search should translate wildcard character
parent
72529877
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
modules/user.module
modules/user.module
+4
-0
modules/user/user.module
modules/user/user.module
+4
-0
No files found.
modules/user.module
View file @
9796455a
...
...
@@ -354,6 +354,10 @@ function user_file_download($file) {
function
user_search
(
$keys
)
{
$find
=
array
();
// Replace wildcards with mysql wildcards
$keys
=
str_replace
(
"*"
,
"%"
,
$keys
);
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%%%s%%'"
,
$keys
,
0
,
20
);
while
(
$account
=
db_fetch_object
(
$result
))
{
$find
[]
=
array
(
"title"
=>
$account
->
name
,
"link"
=>
(
strstr
(
request_uri
(),
"admin"
)
?
url
(
"admin/user/edit/
$account->uid
"
)
:
url
(
"user/view/
$account->uid
"
)),
'user'
=>
$account
->
name
);
...
...
modules/user/user.module
View file @
9796455a
...
...
@@ -354,6 +354,10 @@ function user_file_download($file) {
function
user_search
(
$keys
)
{
$find
=
array
();
// Replace wildcards with mysql wildcards
$keys
=
str_replace
(
"*"
,
"%"
,
$keys
);
$result
=
db_query_range
(
"SELECT * FROM
{
users
}
WHERE name LIKE '%%%s%%'"
,
$keys
,
0
,
20
);
while
(
$account
=
db_fetch_object
(
$result
))
{
$find
[]
=
array
(
"title"
=>
$account
->
name
,
"link"
=>
(
strstr
(
request_uri
(),
"admin"
)
?
url
(
"admin/user/edit/
$account->uid
"
)
:
url
(
"user/view/
$account->uid
"
)),
'user'
=>
$account
->
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment