Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39ab8cf5 authored by Ronak Patel's avatar Ronak Patel
Browse files

added config

parent f1e4193d
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -292,8 +292,8 @@ class UserService {
		
		$newUserDN = "username=$username," . $base;
		
		$quota = $this->LDAPConnectionService->getLdapQuota() * 1024 * 1024;
		$quota = intval($quota);
		$quota = $this->getDefaultQuota() * 1024 * 1024;
		
		$newUserEntry = [
			'mailAddress' => $userEmail,
			'username' => $username,
@@ -451,7 +451,7 @@ class UserService {
		}
		// Set the email address for the user
		$user->setEMailAddress($mailAddress);
		$quota = $this->LDAPConnectionService->getLdapQuota();
		$quota = $this->getDefaultQuota();
		// Format and set the quota for the user (in megabytes)
		$quota = strval($quota) . ' MB';
		$user->setQuota($quota);
@@ -520,4 +520,7 @@ class UserService {
			throw new AddUsernameToCommonStoreException("Error adding username '$username' to common data store.");
		}
	}
	private function getDefaultQuota() {
		return $this->config->getSystemValue('default_quota_in_megabytes', 1024);
	}
}