Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
41eda66a
Commit
41eda66a
authored
Sep 04, 2013
by
Sunil Joshi
Committed by
Simon Green
Sep 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 331529 - editusers list should let me search for disabled users
r=simon, a=simon
parent
a1911aa1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
editusers.cgi
editusers.cgi
+5
-4
search.html.tmpl
template/en/default/admin/users/search.html.tmpl
+7
-3
No files found.
editusers.cgi
View file @
41eda66a
...
...
@@ -68,7 +68,7 @@ if ($action eq 'search') {
my
$matchstr
=
trim
(
$cgi
->
param
(
'matchstr'
));
my
$matchtype
=
$cgi
->
param
(
'matchtype'
);
my
$grouprestrict
=
$cgi
->
param
(
'grouprestrict'
)
||
'0'
;
my
$
enabled_only
=
$cgi
->
param
(
'enabled_only'
)
||
'0'
;
my
$
is_enabled
=
scalar
$cgi
->
param
(
'is_enabled'
)
;
my
$query
=
'SELECT DISTINCT userid, login_name, realname, is_enabled, '
.
$dbh
->
sql_date_format
(
'last_seen_date'
,
'%Y-%m-%d'
)
.
' AS last_seen_date '
.
'FROM profiles'
;
...
...
@@ -160,11 +160,12 @@ if ($action eq 'search') {
$query
.=
" $nextCondition ugm.group_id IN($grouplist) "
;
}
if
(
$enabled_only
eq
'1'
)
{
$query
.=
" $nextCondition profiles.is_enabled = 1 "
;
detaint_natural
(
$is_enabled
);
if
(
$is_enabled
==
0
||
$is_enabled
==
1
)
{
$query
.=
" $nextCondition profiles.is_enabled = ?"
;
$nextCondition
=
'AND'
;
push
(
@bindValues
,
$is_enabled
);
}
$query
.=
' ORDER BY profiles.login_name'
;
$vars
->
{
'users'
}
=
$dbh
->
selectall_arrayref
(
$query
,
...
...
template/en/default/admin/users/search.html.tmpl
View file @
41eda66a
...
...
@@ -56,9 +56,13 @@
[% END %]
<p>
<input type="checkbox" name="enabled_only" value="1" id="enabled_only"
checked="checked">
<label for="enabled_only">Enabled user accounts only</label>
Restrict search to
<select name="is_enabled">
<option value="2">All</option>
<option value="1" selected>Enabled</option>
<option value="0">Disabled</option>
</select>
users.
</p>
[% Hook.process('end') %]
...
...
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