Code Duplication    Length = 9-9 lines in 2 locations

apps/user_ldap/lib/User/User.php 2 locations

@@ 426-434 (lines=9) @@
423
			return;
424
		}
425
		$email = $valueFromLDAP;
426
		if(is_null($valueFromLDAP)) {
427
			$emailAttribute = $this->connection->ldapEmailAttribute;
428
			if(!empty($emailAttribute)) {
429
				$aEmail = $this->access->readAttribute($this->dn, $emailAttribute);
430
				if(is_array($aEmail) && (count($aEmail) > 0)) {
431
					$email = $aEmail[0];
432
				}
433
			}
434
		}
435
		if(!is_null($email)) {
436
			$user = $this->userManager->get($this->uid);
437
			if (!is_null($user)) {
@@ 461-469 (lines=9) @@
458
		$quota = $quotaDefault !== '' ? $quotaDefault : null;
459
		$quota = !is_null($valueFromLDAP) ? $valueFromLDAP : $quota;
460
461
		if(is_null($valueFromLDAP)) {
462
			$quotaAttribute = $this->connection->ldapQuotaAttribute;
463
			if(!empty($quotaAttribute)) {
464
				$aQuota = $this->access->readAttribute($this->dn, $quotaAttribute);
465
				if($aQuota && (count($aQuota) > 0)) {
466
					$quota = $aQuota[0];
467
				}
468
			}
469
		}
470
		if(!is_null($quota)) {
471
			$this->userManager->get($this->uid)->setQuota($quota);
472
		}