Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 1 location

@@ 1055-1058 (lines=4) @@
1052
		}
1053
1054
		//if group really still exists, we will be able to read its objectclass
1055
		if(!is_array($this->access->readAttribute($dn, ''))) {
1056
			$this->access->connection->writeToCache('groupExists'.$gid, false);
1057
			return false;
1058
		}
1059
1060
		$this->access->connection->writeToCache('groupExists'.$gid, true);
1061
		return true;

apps/user_ldap/lib/User_LDAP.php 1 location

@@ 310-312 (lines=3) @@
307
				}
308
				$newDn = $this->access->getUserDnByUuid($uuid);
309
				//check if renamed user is still valid by reapplying the ldap filter
310
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
311
					return false;
312
				}
313
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
314
				return true;
315
			} catch (\Exception $e) {