title: Check if user is an admin by username or email only
body: <p>I am creating an admin section from scratch. The users for this should be users from a wordpress site where they have administrator privileges. So I am currently authenticating the users using </p>
  
  <pre><code>if( (!user_pass_ok($user, $pass)){
      //login fail
  }else{
      //successful login
  }
  </code></pre>
  
  <p>But I also want to know if the user is an administrator. What I came across by looking online is they use the <code>current_user_can( 'administrator' )</code>. But in my case, the user has not yet logged in. All I have to check if the user is an admin, is the username/email address the user enters for login. How can I check if this user is an admin by only the username/email?</p>