title: Sequelize get request data in hooks?
body: <p>I'm trying to store some log data for my models on create, update, delete calls. I want to store some data from the request along with some user data also in the request (using express.js).</p>
  
  <p>In the hooks I have some modules for logging.</p>
  
  <pre><code>hooks: {
      afterCreate: function (order, options, done) {
          // How to get user data stored in express request.
  
          return app.log.set('event', [{message: 'created', data: order, userId: 1}, done]);
      }
  }
  ...
  </code></pre>
  
  <p>The module just makes a record in a table. However it's the <code>userId</code> part I'm having trouble with. I'm using the <code>passport</code> module and it's stored in the request, so how can I get a user object (or any external object for that matter) into the model hooks?</p>
  
  <p>I would like to avoid doing it in a controller or anywhere else as there could be some scripts or other commands that may also enter data.</p>