Started work on supporting twitter.

This commit is contained in:
Tom Coleman 2012-10-01 11:18:05 +10:00
parent 7fd1923d15
commit e563aad151
4 changed files with 14 additions and 10 deletions

View file

@ -10,3 +10,4 @@ accounts-ui
router
groups
moment
accounts-twitter

View file

@ -45,7 +45,7 @@ Template.user_edit.user = function(){
Template.user_edit.email = function(){
if(!this.loading){
return this.emails[0].address;
return this.emails && this.emails[0] && this.emails[0].address;
}
}

10
server/bootstrap.js vendored
View file

@ -23,8 +23,8 @@ function prepopulateDatabase(){
});
}
// Meteor.startup(function () {
// if(Posts.find().count() === 0){
// prepopulateDatabase();
// }
// });
Meteor.startup(function () {
if(Posts.find().count() === 0){
prepopulateDatabase();
}
});

View file

@ -1,6 +1,9 @@
Meteor.accounts.onCreateUser(function(options, extra, user){
// user.created_at=new Date().getTime();
user.email_hash = CryptoJS.MD5(options.email.trim().toLowerCase()).toString();
user.karma = 0;
if (options.email)
user.email_hash = CryptoJS.MD5(options.email.trim().toLowerCase()).toString();
_.extend(user, extra)
return user;
});