2012-10-01 14:52:32 +09:00
|
|
|
getDisplayNameById = function(userId){
|
|
|
|
getDisplayName(Meteor.users.findOne(userId));
|
|
|
|
}
|
|
|
|
getDisplayName = function(user){
|
|
|
|
return (user.profile && user.profile.name) ? user.profile.name : user.username
|
|
|
|
}
|
2012-10-01 12:11:08 +10:00
|
|
|
getCurrentUserEmail = function(){
|
2012-10-01 13:35:20 +09:00
|
|
|
return Meteor.user() ? Meteor.user().emails[0].address : '';
|
2012-10-01 12:11:08 +10:00
|
|
|
}
|
|
|
|
userProfileComplete = function(user) {
|
2012-10-01 16:15:08 +09:00
|
|
|
if(user.services && user.services.twitter){
|
2012-10-01 16:13:56 +09:00
|
|
|
return !!user.profile.email;
|
|
|
|
}else{
|
|
|
|
return true;
|
|
|
|
}
|
2012-10-02 10:54:04 +09:00
|
|
|
}
|