<commit_before>'use strict'

module.exports = function (mongoose, config, db) {
    var jwt = require('jsonwebtoken'), utils = require('../lib/utils')();
    function userResponse(user) {
        return {
            id: user.id,
            phone: user.phone,
            name: user.name,
            email: user.email,
            superuser: user.isSuperUSer()
        };
    }

    return {
        _check(req, cb) {
            var token = req.decoded;
            db.User.findOne({ _id: token._id }).populate('group').exec(function (err, user) {
                if (!user || err) return cb(null);
                return cb(user);
            });<commit_msg>typo<commit_after>'use strict'

module.exports = function (mongoose, config, db) {
    var jwt = require('jsonwebtoken'), utils = require('../lib/utils')();
    function userResponse(user) {
        return {
            id: user.id,
            phone: user.phone,
            name: user.name,
            email: user.email,
            superuser: user.isSuperUser()
        };
    }

    return {
        _check(req, cb) {
            var token = req.decoded;
            db.User.findOne({ _id: token._id }).populate('group').exec(function (err, user) {
                if (!user || err) return cb(null);
                return cb(user);
            });
{'fraction_non_alphanumeric': 0.1429657794676806, 'fraction_numerical': 0.0, 'mean_word_length': 1.702258726899384, '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': '6300930', 'n_tokens_mistral': 387, 'n_tokens_neox': 384, 'n_words': 88}