Merge pull request #748 from fobo66/devel

Small improvements
This commit is contained in:
Sacha Greif 2015-02-04 11:13:36 +09:00
commit 4f92bd4980

View file

@ -21,11 +21,11 @@ Accounts.onCreateUser(function(options, user){
// set email on profile
if (options.email)
user.profile.email = options.email;
// if email is set, use it to generate email hash
if (getEmail(user))
user.email_hash = getEmailHash(user);
// set username on profile
if (!user.profile.name)
user.profile.name = user.username;
@ -39,14 +39,14 @@ Accounts.onCreateUser(function(options, user){
// ------------------------------ Callbacks ------------------------------ //
// run all post submit client callbacks on properties object successively
clog('// Start userCreatedCallbacks')
clog('// Start userCreatedCallbacks');
user = userCreatedCallbacks.reduce(function(result, currentFunction) {
clog('// Running '+currentFunction.name+'…')
clog('// Running '+currentFunction.name+'…');
return currentFunction(result);
}, user);
clog('// Finished userCreatedCallbacks')
clog('// User object:')
clog(user)
clog('// Finished userCreatedCallbacks');
clog('// User object:');
clog(user);
// ------------------------------ Analytics ------------------------------ //
@ -69,12 +69,12 @@ Meteor.methods({
}
);
},
numberOfPostsToday: function(){
console.log(numberOfItemsInPast24Hours(Meteor.user(), Posts));
},
numberOfCommentsToday: function(){
console.log(numberOfItemsInPast24Hours(Meteor.user(), Comments));
},
// numberOfPostsToday: function(){
// console.log(numberOfItemsInPast24Hours(Meteor.user(), Posts));
// },
// numberOfCommentsToday: function(){
// console.log(numberOfItemsInPast24Hours(Meteor.user(), Comments));
// },
testBuffer: function(){
// TODO
},