Loading patches/023-patch_getbyemail.patch +11 −9 Original line number Original line Diff line number Diff line --- lib/private/User/Manager.php 2023-02-03 17:18:44.729561986 +0530 --- ./lib/private/User/Manager.php 2023-02-03 17:18:44.729561986 +0530 +++ lib/private/User/Manager-new.php 2023-02-03 18:00:50.509563655 +0530 +++ ./lib/private/User/Manager-new.php 2023-02-09 17:37:59.809738289 +0530 @@ -705,6 +705,18 @@ @@ -705,6 +705,20 @@ * @since 9.1.0 * @since 9.1.0 */ */ public function getByEmail($email) { public function getByEmail($email) { + $uid=$email; // get first part of email if it contains alt domain, otherwise it is just $email + $uid=$email; // get first part of email if it contains alt domain, otherwise it is just $email + $alt_domain = $this->config->getSystemValue('alt_mail_domain', ''); + $alt_domain = $this->config->getSystemValue('alt_mail_domain', ''); + if (isset($alt_domain)) { + $alt_domain_suffix = !empty($alt_domain) ? '@' . $alt_domain : ''; + $alt_domain_suffix = !empty($alt_domain) ? '@' . $alt_domain : ''; + + + if (stristr($email, $alt_domain_suffix) !== FALSE) { + if (stristr($email, $alt_domain_suffix) !== FALSE) { Loading @@ -15,6 +16,7 @@ + if ($this->get($uid)) { + if ($this->get($uid)) { + return([$this->get($uid)]); + return([$this->get($uid)]); + } + } + } + + // looking for 'email' only (and not primary_mail) is intentional // looking for 'email' only (and not primary_mail) is intentional $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); Loading Loading
patches/023-patch_getbyemail.patch +11 −9 Original line number Original line Diff line number Diff line --- lib/private/User/Manager.php 2023-02-03 17:18:44.729561986 +0530 --- ./lib/private/User/Manager.php 2023-02-03 17:18:44.729561986 +0530 +++ lib/private/User/Manager-new.php 2023-02-03 18:00:50.509563655 +0530 +++ ./lib/private/User/Manager-new.php 2023-02-09 17:37:59.809738289 +0530 @@ -705,6 +705,18 @@ @@ -705,6 +705,20 @@ * @since 9.1.0 * @since 9.1.0 */ */ public function getByEmail($email) { public function getByEmail($email) { + $uid=$email; // get first part of email if it contains alt domain, otherwise it is just $email + $uid=$email; // get first part of email if it contains alt domain, otherwise it is just $email + $alt_domain = $this->config->getSystemValue('alt_mail_domain', ''); + $alt_domain = $this->config->getSystemValue('alt_mail_domain', ''); + if (isset($alt_domain)) { + $alt_domain_suffix = !empty($alt_domain) ? '@' . $alt_domain : ''; + $alt_domain_suffix = !empty($alt_domain) ? '@' . $alt_domain : ''; + + + if (stristr($email, $alt_domain_suffix) !== FALSE) { + if (stristr($email, $alt_domain_suffix) !== FALSE) { Loading @@ -15,6 +16,7 @@ + if ($this->get($uid)) { + if ($this->get($uid)) { + return([$this->get($uid)]); + return([$this->get($uid)]); + } + } + } + + // looking for 'email' only (and not primary_mail) is intentional // looking for 'email' only (and not primary_mail) is intentional $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); Loading