Loads user with user email.

@param string $email

@return array
178273
public function loadByEmail($email)
    {
        try {
            return $this->innerGateway->loadByEmail($email);
        } catch (\DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (\PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
1073499
protected function getEmailData(User $user, $email)
    {
        $token = $this->generateToken($user, $email);

        return [
            '{username}' => $user->display_name,
            '{url}' => $this->url->to('forum')->route('confirmEmail', ['token' => $token->token]),
            '{forum}' => $this->settings->get('forum_title')
        ];
    }
405487
public function email($email = null) {
		$this->out('Email:');
		while (empty($email) || !Validation::email($email)) {
			$email = $this->in('New email address (must have a valid form at least)');
		}

		/** @var \App\Model\Table\UsersTable $Users */
		$Users = TableRegistry::get(CLASS_USERS);
		$this->Users = $Users;
		if (!$this->Users->hasField('email')) {
			$this->abort(CLASS_USERS . ' table doesnt have an email field!');
		}

		$this->hr();
		$this->out('Resetting...');

		if (empty($this->params['dry-run'])) {
			$count = $this->Users->updateAll(['email' => $email . ''], ['email !=' => $email]);
		} else {
			$count = $this->Users->find('all', ['conditions' => [CLASS_USERS . '.email !=' => $email]])->count();
		}
		$this->out($count . ' emails resetted - DONE');
	}
112020
public function findOneByEmail($email)
    {
        $user = $this
            ->findOneBy([
                'email' => $email,
            ]);

        return ($user instanceof AbstractUserInterface)
            ? $user
            : null;
    }
102214
private function findUser($email)
    {
        $response = $this->call($this->tyrUrl . '/' . $this->version . '/users/?email=' . $email);

        $user = json_decode($response);
        if (!empty($user)) {
            return $user[0];
        }

        return false;
    }
572573
def get_user_and_user_email_by_email(self, email):
        """"""
        if self.UserEmailClass:
            user_email = self.db_adapter.ifind_first_object(self.UserEmailClass, email=email)
            user = user_email.user if user_email else None
        else:
            user = self.db_adapter.ifind_first_object(self.UserClass, email=email)
            user_email = user
        return (user, user_email)
460776
protected function getByEmail($email) {
        $users = $this->_client->get('/users?search='.urlencode($email));
        return isset($users[0]) ? $users[0] : false;
    }
201792
public function getUserByEmail($email) {
		$list = $this->itemsFilter(['email' => $email, 'limit' => 1]);
		if (empty($list)) {
			return NULL;
		}
		$user = reset($list);
		return $user;
	}
983590
public function getGoogleServiceGmailForEmail(string $email)
    {
        if (array_key_exists($email, $this->googleServiceGmails)) {
            return $this->googleServiceGmails[$email];
        }

        $googleServiceGmail = new \Google_Service_Gmail($this->serviceAccount->getGoogleClientForEmail($email));
        $this->googleServiceGmails[$email] = $googleServiceGmail;

        return $googleServiceGmail;
    }
1091015
public function getUserLoginFromUserEmail($userEmail)
    {
        Piwik::checkUserIsNotAnonymous();
        Piwik::checkUserHasSomeAdminAccess();

        $this->checkUserEmailExists($userEmail);

        $user = $this->model->getUserByEmail($userEmail);

        // any user with some admin access is allowed to find any user by email, no need to filter by access here

        return $user['login'];
    }
1154887
public function updateTheAuthenticatedUser($email = null)
	{
		$data = array();
		if(!is_null($email))
			$data['email'] = $email;
		
		return $this->client->request("/user", 'PATCH', $data, 200, 'GitHubPrivateUser');
	}
1304665
public static function getDomain($emails): array
    {
        $result = [];

        if (empty($emails)) {
            return $result;
        }

        $emails = self::handleEmailsInput($emails);

        foreach ($emails as $email) {
            if (!self::isValid($email)) {
                continue;
            }

            $domain = self::extractDomain($email);
            if (!empty($domain) && !in_array($domain, $result, true)) {
                $result[] = $domain;
            }
        }

        return $result;
    }
243062
public function getByEmail($email)
    {
        if (!is_string($email) || empty($email)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'contact_view_email',
            'email' => $email
        );

        $response = $this->request($parameters);



        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            \FondOfPHP\ActiveCampaign\DataTransferObject\Contact::class,
            'json'
        );
    }
1262287
private function emailToUsername($email = null)
    {
        if ($user = get_user_by('email', $email)) {
            if (isset($user->user_login)) {
                return $user->user_login;
            }
        }

        return null;
    }
516017
private function getAccessLevels($email)
    {
        foreach ($this->hostedDomains as $hostedDomain) {
            if (preg_match('/'.$hostedDomain['domain_name'].'$/', $email)) {
                return $hostedDomain['access_levels'];
            }
        }

        return null;
    }
796087
public function getModelForEmail($email)
    {
        $emailTemplates = $this->getEmailTemplates();

        foreach ($emailTemplates as $emailTemplate) {
            $emailRule = new Email($emailTemplate);

            if ($emailRule->check($email)) {
                return $this->bannedEmailsRepository->findByEmail($emailTemplate);
            }
        }

        return null;
    }
558687
public function email($email = null)
  {
    $eml = EmailAddress::newInstance($this);
    if($email !== null)
    {
      $eml->setEmailAddress($email);
    }
    return $eml;
  }