parseInt member count, use getMemberCount in install js

This commit is contained in:
Barış Soner Uşaklı
2015-05-26 13:55:40 -04:00
parent 50d9a3f0a7
commit 8300aeec35
2 changed files with 11 additions and 3 deletions

View File

@@ -294,8 +294,11 @@ function enableDefaultTheme(next) {
function createAdministrator(next) {
var Groups = require('./groups');
Groups.get('administrators', {}, function (err, groupObj) {
if (!err && groupObj && groupObj.memberCount > 0) {
Groups.getMemberCount('administrators', function (err, memberCount) {
if (err) {
return next(err);
}
if (memberCount > 0) {
process.stdout.write('Administrator found, skipping Admin setup\n');
next();
} else {