lib/authenticator.js
function setUserOnRequest (req, res, next) {
  if (!req.session || !req.session.user) {
    return next()
  }

  User.get(req.session.user, function (err, user) {
    if (err) {
      return next(err)
    }
    if (!user) {
      delete req.session.user
      return next()
    }
    req.user = user
    next()
  })
}
function setUserOnRequest (req, res, next) {
  if (!req.session || !req.session.user) {
    return next()
  }

  User.get(req.session.user, function (err, user) {
    if (err) {
      return next(err)
    }
    if (!user) {
      delete req.session.user
      return next()
    }
    req.user = user
    next()
  })
}
function setUserOnRequest ( req , res , next ) { if ( ! req . session || ! req . session . user ) { return next ( ) } User . get ( req . session . user , function ( err , user ) { if ( err ) { return next ( err ) } if ( ! user ) { delete req . session . user return next ( ) } req . user = user next ( ) } ) }
Set req.user
Set req . user