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

Commit ac6f24a1 authored by Akhil's avatar Akhil 🙂
Browse files

check if blacklisted_domains is empty

parent 74c0bd7a
Loading
Loading
Loading
Loading
Loading
+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);