Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/lib/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/lib/User_LDAP.php 1 location

@@ 293-295 (lines=3) @@
290
				}
291
				$newDn = $this->access->getUserDnByUuid($uuid);
292
				//check if renamed user is still valid by reapplying the ldap filter
293
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
294
					return false;
295
				}
296
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
297
				return true;
298
			} catch (\Exception $e) {