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

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