Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F23014636
D10480.id25198.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D10480.id25198.diff
View Options
Index: src/applications/people/query/PhabricatorPeopleQuery.php
===================================================================
--- src/applications/people/query/PhabricatorPeopleQuery.php
+++ src/applications/people/query/PhabricatorPeopleQuery.php
@@ -269,10 +269,11 @@
(int)$this->isApproved);
}
- if ($this->isSystemAgent) {
+ if ($this->isSystemAgent !== null) {
$where[] = qsprintf(
$conn_r,
- 'user.isSystemAgent = 1');
+ 'user.isSystemAgent = %d',
+ (int)$this->isSystemAgent);
}
if (strlen($this->nameLike)) {
Index: src/applications/people/query/PhabricatorPeopleSearchEngine.php
===================================================================
--- src/applications/people/query/PhabricatorPeopleSearchEngine.php
+++ src/applications/people/query/PhabricatorPeopleSearchEngine.php
@@ -24,6 +24,7 @@
$saved->setParameter('isDisabled', $request->getStr('isDisabled'));
$saved->setParameter('isSystemAgent', $request->getStr('isSystemAgent'));
$saved->setParameter('needsApproval', $request->getStr('needsApproval'));
+ $saved->setParameter('isNormal', $request->getStr('isNormal'));
$saved->setParameter('createdStart', $request->getStr('createdStart'));
$saved->setParameter('createdEnd', $request->getStr('createdEnd'));
@@ -66,6 +67,7 @@
$is_system_agent = $saved->getParameter('isSystemAgent');
$needs_approval = $saved->getParameter('needsApproval');
$no_disabled = $saved->getParameter('noDisabled');
+ $is_normal = $saved->getParameter('isNormal');
if ($is_admin) {
$query->withIsAdmin(true);
@@ -85,6 +87,12 @@
$query->withIsApproved(false);
}
+ if ($is_normal) {
+ $query->withIsDisabled(false);
+ $query->withIsSystemAgent(false);
+ $query->withIsApproved(true);
+ }
+
$start = $this->parseDateTime($saved->getParameter('createdStart'));
$end = $this->parseDateTime($saved->getParameter('createdEnd'));
@@ -112,6 +120,7 @@
$is_disabled = $saved->getParameter('isDisabled');
$is_system_agent = $saved->getParameter('isSystemAgent');
$needs_approval = $saved->getParameter('needsApproval');
+ $is_normal = $saved->getParameter('isNormal');
$form
->appendChild(
@@ -146,7 +155,12 @@
'needsApproval',
1,
pht('Show only users who need approval.'),
- $needs_approval));
+ $needs_approval)
+ ->addCheckbox(
+ 'isNormal',
+ 1,
+ pht('Show only approved users which are not disabled and are not bots.'),
+ $is_normal));
$this->appendCustomFieldsToForm($form, $saved);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 27, 4:42 AM (22 h, 44 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
17420134
Default Alt Text
D10480.id25198.diff (2 KB)
Attached To
Mode
D10480: Filter by active users
Attached
Detach File
Event Timeline
Log In to Comment