Set user account inactive

So I just implemented a ‘disabled’ state lately on my user accounts. This should be of use to you.

server/methods/user.js

setUserDisableState: function (userId, state) {
    var loggedInUserId = Meteor.userId();

    if (!PermissionMap.Users.Invite.checkRole(loggedInUserId)) {
      throw new Meteor.Error(403, "Access denied");
    }

    if (state) {
      Meteor.users.update({ _id: userId }, { $set: { 'disabled': state }});

      // Logout user
      Meteor.users.update({ _id: userId }, {$set: { "services.resume.loginTokens" : [] }});
    } else {
      Meteor.users.update({ _id: userId }, { $unset: { 'disabled': '' }});
    }
  }

server/users/on_login.js

Accounts.validateLoginAttempt(function(attemptObj) {
  if (attemptObj.user && attemptObj.allowed && attemptObj.user.disabled) {
    throw new Meteor.Error(403, "Your account is disabled.");
  }

  return true;
});

Hope this helps.