Code Duplication    Length = 3-4 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 1 location

@@ 1064-1067 (lines=4) @@
1061
		}
1062
1063
		//if group really still exists, we will be able to read its objectclass
1064
		if(!is_array($this->access->readAttribute($dn, ''))) {
1065
			$this->access->connection->writeToCache('groupExists'.$gid, false);
1066
			return false;
1067
		}
1068
1069
		$this->access->connection->writeToCache('groupExists'.$gid, true);
1070
		return true;

apps/user_ldap/lib/User_LDAP.php 1 location

@@ 324-326 (lines=3) @@
321
				}
322
				$newDn = $this->access->getUserDnByUuid($uuid);
323
				//check if renamed user is still valid by reapplying the ldap filter
324
				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
325
					return false;
326
				}
327
				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
328
				return true;
329
			} catch (\Exception $e) {