update:function(req,res,next){if(values.admin!=undefined&&values.admin.constructor===Array){if(values.admin[1]==='on'){values.admin=true;}}varuserObj={name:req.param('name'),title:req.param('title'),email:req.param('email')}if(req.session.User.admin){userObj.admin=values.admin;}//replace req.params.all with userObjUser.update(req.param('id'),userObj,functionuserUpdated(err){if(err){returnres.redirect('/user/edit/'+req.param('id'));}res.redirect('/user/show/'+req.param('id'));});},