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

Commit 4788399c authored by Akhil's avatar Akhil 🙂
Browse files

Merge branch 'dev/remove-blacklist' into 'main'

check if blacklisted_domains is empty

See merge request !133
parents 74c0bd7a e43e6928
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
    <description><![CDATA[in /e/OS cloud, nextcloud accounts are linked to mail accounts. This app ensures both are coordinated: it sets the e-mail address, quota and storage of the user upon creation.
    It also completes the account deletion by cleaning other parts of the /e/OS cloud setup to ensure no more data is retained when a user requests an account deletion.
    This app uses the UserDeletedEvent to invoke scripts in the docker-welcome container of /e/OS cloud setup]]></description>
    <version>6.0.2</version>
    <version>6.0.3</version>
    <licence>agpl</licence>
    <author mail="dev@murena.com" homepage="https://murena.com/">Murena SAS</author>
    <namespace>EcloudAccounts</namespace>
+8 −1
Original line number Diff line number Diff line
@@ -287,8 +287,15 @@ class UserService {
	public function isBlacklistedEmail(string $email): bool {
		// Get the blacklisted domains from configuration
		$blacklistedDomainsInJson = $this->config->getAppValue(Application::APP_ID, 'blacklisted_domains');
		if (empty($blacklistedDomainsInJson)) {
			return false;
		}
		$blacklistedDomains = json_decode($blacklistedDomainsInJson, true);

		if (empty($blacklistedDomains)) {
			return false;
		}

		// Split the email address into parts using explode
		$emailParts = explode('@', $email);