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
e4f8a784
Commit
e4f8a784
authored
Sep 30, 2011
by
Tiago Mello
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 315451: Add 'Enabled user accounts only' filter when searching for
user accounts. r=glob, a=LpSolit
parent
dd832b27
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
editusers.cgi
editusers.cgi
+7
-0
search.html.tmpl
template/en/default/admin/users/search.html.tmpl
+7
-0
No files found.
editusers.cgi
View file @
e4f8a784
...
@@ -77,6 +77,7 @@ if ($action eq 'search') {
...
@@ -77,6 +77,7 @@ if ($action eq 'search') {
my
$matchstr
=
trim
(
$cgi
->
param
(
'matchstr'
));
my
$matchstr
=
trim
(
$cgi
->
param
(
'matchstr'
));
my
$matchtype
=
$cgi
->
param
(
'matchtype'
);
my
$matchtype
=
$cgi
->
param
(
'matchtype'
);
my
$grouprestrict
=
$cgi
->
param
(
'grouprestrict'
)
||
'0'
;
my
$grouprestrict
=
$cgi
->
param
(
'grouprestrict'
)
||
'0'
;
my
$enabled_only
=
$cgi
->
param
(
'enabled_only'
)
||
'0'
;
my
$query
=
'SELECT DISTINCT userid, login_name, realname, is_enabled '
.
my
$query
=
'SELECT DISTINCT userid, login_name, realname, is_enabled '
.
'FROM profiles'
;
'FROM profiles'
;
my
@bindValues
;
my
@bindValues
;
...
@@ -167,6 +168,12 @@ if ($action eq 'search') {
...
@@ -167,6 +168,12 @@ if ($action eq 'search') {
@
{
Bugzilla::
Group
->
flatten_group_membership
(
$group
->
id
)});
@
{
Bugzilla::
Group
->
flatten_group_membership
(
$group
->
id
)});
$query
.=
" $nextCondition ugm.group_id IN($grouplist) "
;
$query
.=
" $nextCondition ugm.group_id IN($grouplist) "
;
}
}
if
(
$enabled_only
eq
'1'
)
{
$query
.=
" $nextCondition profiles.is_enabled = 1 "
;
$nextCondition
=
'AND'
;
}
$query
.=
' ORDER BY profiles.login_name'
;
$query
.=
' ORDER BY profiles.login_name'
;
$vars
->
{
'users'
}
=
$dbh
->
selectall_arrayref
(
$query
,
$vars
->
{
'users'
}
=
$dbh
->
selectall_arrayref
(
$query
,
...
...
template/en/default/admin/users/search.html.tmpl
View file @
e4f8a784
...
@@ -62,6 +62,13 @@
...
@@ -62,6 +62,13 @@
[% END %]
[% END %]
</select></p>
</select></p>
[% END %]
[% END %]
<p>
<input type="checkbox" name="enabled_only" value="1" id="enabled_only"
checked="checked">
<label for="enabled_only">Enabled user accounts only</label>
</p>
</form>
</form>
[% IF editusers %]
[% IF editusers %]
...
...
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