title: Get all users in Umbraco v7.1.4
body: <p>I am trying to retrieve the details of all users in my Umbraco site. The purpose of this is so that a content creator can specify usernames as "Owners" of the content that can be contacted by anonymous users of the website (a simple "mailto" link using the stored email address after matching username with username given by content creator).</p>
  
  <p>I have been able to get user details using:</p>
  
  <pre><code>var users = umbraco.BusinessLogic.User.getAll();
  </code></pre>
  
  <p>but I am prompted in Visual Studio by the following warning:</p>
  
  <pre><code>'Umbraco.BusinessLogic.User' is obsolete: '"Use the UserService instead"'
  </code></pre>
  
  <p>I created an instance of the UserService but the GetAll() function requires a number of parameters that the BusinessLogic function does not.</p>
  
  <p>How do I get all users using the UserService?</p>
  
  <p>Is there a better way for me to achieve what I am trying to achieve?</p>
  
  <p>For clarification, this is the following code I have used with the deprecated BusinessLogic:</p>
  
  <pre><code>var users = umbraco.BusinessLogic.User.getAll();
  var owners = Umbraco.Field("owner").ToString().Split(',');
  
  foreach (var user in users)
  {
      foreach (var owner in owners)
      {
          if (String.Equals(user.LoginName, owner))
          {
              &lt;div class="owner"&gt;
                  &lt;a href="mailto:@user.Email"&gt;@owner&lt;/a&gt;
              &lt;/div&gt;
          }    
      }
  
  }
  </code></pre>