Answers.Body: <p>Something like this should work:</p>
  
  <pre><code>$user = User::find()
      -&gt;email($email)
      -&gt;status(null)
      -&gt;one();
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-22T18:15:01.537Z
Answers.LastActivityDate: 2016-12-22T18:15:01.537Z
Answers.UserDisplayName: Brad Bell
Body: <p>So I'm running into an issue where I'm given the users email. From there, I use the following code: <code>Craft::$app-&gt;getUsers()-&gt;getUserByEmail($email);</code>. This returns a null value, not because the user does not exists, but rather the status is set to suspended. </p>
  
  <p>Is there a way to retrieve the <code>User</code> model from the email address, regardless of status? </p>
  
Tags: <users><craft3>
Title: Obtain suspended users in Craft3 Dev Preview
ThreadText: # Obtain suspended users in Craft3 Dev Preview
  
  (Asked by: username_0 on 2016-12-22)
  
  So I'm running into an issue where I'm given the users email. From there, I use the following code: `Craft::$app->getUsers()->getUserByEmail($email);`. This returns a null value, not because the user does not exists, but rather the status is set to suspended.
  
  Is there a way to retrieve the `User` model from the email address, regardless of status?
  
  **Tags:** users, craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-22. Score: 2 | Accepted answer
  
  Something like this should work:
  
  ```
  $user = User::find()
      ->email($email)
      ->status(null)
      ->one();
  
  ```
  
  
  ---
  
  