Skip to content

Commit a19144a

Browse files
committed
issue#91 Find group by gid or groupname, find user by uid or display name or email
1 parent c094996 commit a19144a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
### Added
99
- Users can confirm passwords
1010
- Support Nextcloud password_policy
11+
- Extend user/group search
1112

1213
### Fixed
1314
- Getting user display names backend

lib/Query/QueryProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private function loadQueries()
140140
"SELECT $groupColumns " .
141141
"FROM $group g " .
142142
"WHERE g.$gGID LIKE :$searchParam " .
143+
(empty($gName) ? "" : "OR g.$gName LIKE :$searchParam ") .
143144
"ORDER BY g.$gGID",
144145

145146
Query::FIND_USER =>
@@ -163,6 +164,8 @@ private function loadQueries()
163164
"SELECT $userColumns " .
164165
"FROM $user u " .
165166
"WHERE u.$uUID LIKE :$searchParam " .
167+
(empty($uName) ? "" : "OR u.$uName LIKE :$searchParam ") .
168+
(empty($uEmail) ? "" : "OR u.$uEmail LIKE :$searchParam ") .
166169
"ORDER BY u.$uUID",
167170

168171
Query::UPDATE_DISPLAY_NAME =>

0 commit comments

Comments
 (0)