Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 1 location

@@ 885-888 (lines=4) @@
882
		}
883
884
		//if group really still exists, we will be able to read its objectclass
885
		if(!is_array($this->access->readAttribute($dn, ''))) {
886
			$this->access->connection->writeToCache('groupExists'.$gid, false);
887
			return false;
888
		}
889
890
		$this->access->connection->writeToCache('groupExists'.$gid, true);
891
		return true;

apps/user_ldap/lib/User_LDAP.php 1 location

@@ 276-278 (lines=3) @@
273
				}
274
				$newDn = $this->access->getUserDnByUuid($uuid);
275
				//check if renamed user is still valid by reapplying the ldap filter
276
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
277
					return false;
278
				}
279
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
280
				return true;
281
			} catch (\Exception $e) {