Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/group_ldap.php 1 location

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

apps/user_ldap/user_ldap.php 1 location

@@ 234-236 (lines=3) @@
231
				}
232
				$newDn = $this->access->getUserDnByUuid($uuid);
233
				//check if renamed user is still valid by reapplying the ldap filter
234
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
235
					return false;
236
				}
237
238
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
239
				return true;