diff --git a/client/common/users.js b/client/common/users.js index 0b899ac..a843999 100644 --- a/client/common/users.js +++ b/client/common/users.js @@ -1,3 +1,7 @@ +Template.registerHelper('getUsersTotal', function () { + return UserInfo.find({}).fetch().length; +}); + getUser = function (id) { return UserInfo.findOne({ _id: id @@ -5,7 +9,10 @@ getUser = function (id) { } Template.registerHelper('getUsers', function () { - return UserInfo.find({}, { + var selectedGroup = Session.get('selectedGroup'); + return UserInfo.find({ + groups: selectedGroup._id + }, { sort: { username: 1 } diff --git a/client/pages/account/login.html b/client/pages/account/login.html index d9ec336..2e42f1b 100644 --- a/client/pages/account/login.html +++ b/client/pages/account/login.html @@ -7,7 +7,7 @@
GoPredict.com is a social sports prediction network. Challenge other users in the Euro2016 competition and become a prediction wizard.
-Join our community of {{length getUsers}} wizards!
+Join our community of {{getUsersTotal}} wizards!
Do you need to create a new account?