Code Duplication    Length = 10-14 lines in 2 locations

apps/user_ldap/lib/User_Proxy.php 1 location

@@ 311-320 (lines=10) @@
308
	 * Count the number of users
309
	 * @return int|bool
310
	 */
311
	public function countUsers() {
312
		$users = false;
313
		foreach($this->backends as $backend) {
314
			$backendUsers = $backend->countUsers();
315
			if ($backendUsers !== false) {
316
				$users += $backendUsers;
317
			}
318
		}
319
		return $users;
320
	}
321
322
	/**
323
	 * Return access for LDAP interaction.

lib/private/Group/Group.php 1 location

@@ 246-259 (lines=14) @@
243
	 *
244
	 * @return int|bool
245
	 */
246
	public function countDisabled() {
247
		$users = false;
248
		foreach ($this->backends as $backend) {
249
			if($backend instanceOf ICountDisabledInGroup) {
250
				if($users === false) {
251
					//we could directly add to a bool variable, but this would
252
					//be ugly
253
					$users = 0;
254
				}
255
				$users += $backend->countDisabledInGroup($this->gid);
256
			}
257
		}
258
		return $users;
259
	}
260
261
	/**
262
	 * search for users in the group by displayname