Commit 4a2f0440 authored by 陈志良's avatar 陈志良

限制更新条件

parent b5b7df19
......@@ -71,7 +71,11 @@ router.post('/user/identifyUser',function(req,res,next){
res.json('error');
}else{
if(doc){
updateUser(doc._id,entity.nickName,entity.icon);
if(entity.nickName || entity.icon){
if(doc.nickName !== entity.nickName || doc.icon !== entity.icon){
updateUser(doc._id,entity.nickName,entity.icon);
}
}
req.session.mobileForumUser={
userId:doc._id,
openId:doc.uid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment