<commit_before>var app = require('cantina')
  , _ = require('underscore')
  , async = require('async');

app.serializeUser = function (user, cb) {
  cb(null, user.id);
};

app.deserializeUser = function (id, cb) {
  app.collections.user.load(id, cb);
};

require('./third-party');
require('cantina-redis');
require('cantina-session');
require('cantina-auth');

app.auth = {};

app.auth.logIn = function (user, req, res, next) {
  req.logIn(user, function (err){
    if (err) return next(err);
    app.redis.SADD(app.redisKey('sessions', user.id), req.sessionID, next);
  });
};

app.auth.killSession = function (user, cb) {
  var key = app.redisKey('sessions', user.id ? user.id : user);
  app.redis.SMEMBERS(key, function (err, members) {
    if (err) return cb(err);
    if (members) {
      async.forEach(members, app.sessions.destroy, function (err) {<commit_msg>Fixes users collection name<commit_after>var app = require('cantina')
  , _ = require('underscore')
  , async = require('async');

app.serializeUser = function (user, cb) {
  cb(null, user.id);
};

app.deserializeUser = function (id, cb) {
  app.collections.users.load(id, cb);
};

require('./third-party');
require('cantina-redis');
require('cantina-session');
require('cantina-auth');

app.auth = {};

app.auth.logIn = function (user, req, res, next) {
  req.logIn(user, function (err){
    if (err) return next(err);
    app.redis.SADD(app.redisKey('sessions', user.id), req.sessionID, next);
  });
};

app.auth.killSession = function (user, cb) {
  var key = app.redisKey('sessions', user.id ? user.id : user);
  app.redis.SMEMBERS(key, function (err, members) {
    if (err) return cb(err);
    if (members) {
      async.forEach(members, app.sessions.destroy, function (err) {
{'fraction_non_alphanumeric': 0.18753573470554602, 'fraction_numerical': 0.0, 'mean_word_length': 4.271084337349397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1143958', 'n_tokens_mistral': 635, 'n_tokens_neox': 634, 'n_words': 131}