title: Can I send data via express next() function?
body: <p>I'm working on a webapp that requires atuhentication process and session management with express. I've done with the backend sessions stuff. Now i want to show on the UI the user who is signed in. privateContent is a function that verify if someone is logged in, Like so: </p>
  
  <pre><code>...
  app.get( '/authRequired', queries.privateContent , routes.tasks );
  ...
  </code></pre>
  
  <p>Here is queries.privateContent:</p>
  
  <pre><code>...
  exports.privateContent = function ( req, res, next ) {
    if ( req.session.user ) {
      var username = req.session.user.username;
      User.findOne( { 'username': username }, function ( err, obj ) {
        if ( true ) {
          next();
        } else {
          res.redirect('/');
        }
      });
    } else {
      res.redirect('/');
    }
  };
  ...
  </code></pre>
  
  <p>What i want to know is: Am i able to send data like this? :</p>
  
  <pre><code>...
  next( username );
  ...
  </code></pre>
  
  <p>if so, how can i retrieve it when routes.tasks render, if that happens as follows (i'm trying to get the data in the code below, but it does not work.): </p>
  
  <pre><code>...
  exports.my_tasks = function ( req, res, data ) {
        console.log(data);
        res.render('tasks/tasks',
                    { title: 'Paraíso', controller: 'MyTasksController', user: data });
  };
  ...
  </code></pre>
  
  <p>As you can guess, my intentions are to pass via next the current user who is signed in to the routing modules, so i can print the username in the UI using jade. 
  Thank you for your help. :)</p>