Code Duplication    Length = 11-11 lines in 2 locations

lib/private/group/group.php 2 locations

@@ 191-201 (lines=11) @@
188
	 * @param int $offset
189
	 * @return \OC\User\User[]
190
	 */
191
	public function searchUsers($search, $limit = null, $offset = null) {
192
		$users = array();
193
		foreach ($this->backends as $backend) {
194
			$userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
195
			$users += $this->getVerifiedUsers($userIds);
196
			if (!is_null($limit) and $limit <= 0) {
197
				return array_values($users);
198
			}
199
		}
200
		return array_values($users);
201
	}
202
203
	/**
204
	 * returns the number of users matching the search string
@@ 232-242 (lines=11) @@
229
	 * @param int $offset
230
	 * @return \OC\User\User[]
231
	 */
232
	public function searchDisplayName($search, $limit = null, $offset = null) {
233
		$users = array();
234
		foreach ($this->backends as $backend) {
235
			$userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
236
			$users = $this->getVerifiedUsers($userIds);
237
			if (!is_null($limit) and $limit <= 0) {
238
				return array_values($users);
239
			}
240
		}
241
		return array_values($users);
242
	}
243
244
	/**
245
	 * delete the group