mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
regenerate email hash on profile update
This commit is contained in:
parent
67de4f432a
commit
f67ad0b7ae
2 changed files with 5 additions and 2 deletions
|
@ -84,6 +84,9 @@ Template[getTemplate('user_edit')].events({
|
|||
$('html, body').animate({scrollTop: element.offset().top});
|
||||
});
|
||||
});
|
||||
|
||||
Meteor.call('setEmailHash', user);
|
||||
|
||||
}
|
||||
|
||||
});
|
|
@ -110,7 +110,7 @@ Meteor.methods({
|
|||
return Math.abs(object.score - newScore);
|
||||
},
|
||||
setEmailHash: function(user){
|
||||
var email_hash = CryptoJS.MD5(getEmail(user).trim().toLowerCase()).toString();
|
||||
Meteor.users.update(user._id, {$set : {email_hash : email_hash}});
|
||||
var hash = getEmailHash(user);
|
||||
Meteor.users.update(user._id, {$set : {email_hash : hash}});
|
||||
}
|
||||
});
|
Loading…
Add table
Reference in a new issue