Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 1 location

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

apps/user_ldap/lib/User_LDAP.php 1 location

@@ 245-247 (lines=3) @@
242
				}
243
				$newDn = $this->access->getUserDnByUuid($uuid);
244
				//check if renamed user is still valid by reapplying the ldap filter
245
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
246
					return false;
247
				}
248
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
249
				return true;
250
			} catch (\Exception $e) {