title: Getting "Function: Bound" when trying to call a method
body: <p>I'm using the Sails.js MVC and I'm trying to setup a service so I can make a call to an Active Directory server and pass the data for a user back to my controller.</p>
  
  <p>I'm using some internal company modules for this which connect to our servers and pass back a user array with all the data for a selected user. </p>
  
  <p>If I do this by making a function directly in the API controller it works fine, but when doing it by calling through a function from a separate file, rather than returning an array of [Function: bound].</p>
  
  <p>Code from controller (LabController.js):</p>
  
  <pre><code>var adGet = require('../services/adGet');
  module.exports = {
  
  test: function (req, res) {
      console.log(adGet.userData);
      res.view({
          user: adGet.userData
      });
  }
  }
  </code></pre>
  
  <p>Code from the service (adGet.js):</p>
  
  <pre><code>module.exports = {
  userData: function (req, res) {
      var ad = require('active-directory');
      ad.setCredentials({
          user: 'username_removed',
          password: 'password_removed'
      });
      ad.getUser(req.session.sisso.idsid).then(function (user) {
          return (user);
      });
  }
  }
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>