Vulcan/lib/users.js
2012-10-01 16:08:30 +09:00

12 lines
No EOL
371 B
JavaScript

getDisplayNameById = function(userId){
getDisplayName(Meteor.users.findOne(userId));
}
getDisplayName = function(user){
return (user.profile && user.profile.name) ? user.profile.name : user.username
}
getCurrentUserEmail = function(){
return Meteor.user() ? Meteor.user().emails[0].address : '';
}
userProfileComplete = function(user) {
return !!user.profile.email;
}