title: update User information mongoose, MongoDB, NodeJS
body: <p>I am working on an edit-profile page and i want to change/update the information of the documents in my mongooseDB, but my code does not update the document. Any suggestions?</p>
  
  <pre><code>router.get('/edit', isAuthenticated, function (req, res, next) {
      res.render('profile/editprofile', {
          user: req.user
      });
  });
  router.post('/edit', isAuthenticated, function (req, res, next) {
  
      User.update({_id: req.session.passport.user.id}, {
          email: req.body.email,
          password: req.body.password,
          name: req.body.name,
          phone: req.body.phone,
          classc: req.body.classc,
          //graduated: req.body.graduated;
          major: req.body.major,
          minor: req.body.mino,
          linkedin: req.body.linkedin,
          bio: req.body.bio
      }, function (err){
          if (err) console.log(err);
          res.render('profile/profile', {
          user: req.user
      });
  });
  });
  </code></pre>