function userFromToken(req, cb) {
  const { accessToken } = req;

  app.models.zlUser.findById(accessToken.userId, (err, usr) => {
    if (!err && usr) {
      cb(null, usr);
    }
    else cb(err);
  });
}
function userFromToken(req, cb) {
  const { accessToken } = req;

  app.models.zlUser.findById(accessToken.userId, (err, usr) => {
    if (!err && usr) {
      cb(null, usr);
    }
    else cb(err);
  });
}
function userFromToken ( req , cb ) { const { accessToken } = req ; app . models . zlUser . findById ( accessToken . userId , ( err , usr ) => { if ( ! err && usr ) { cb ( null , usr ) ; } else cb ( err ) ; } ) ; }
Get user detail from accessToken
Get user detail from accessToken