<commit_before>/*
    Agora Forum Software
    Copyright (C) 2016 <NAME>
    License: GPL, Check file LICENSE
*/

Meteor.subscribe('users');
Meteor.subscribe('myself');
Meteor.subscribe('reports');

Accounts.onLogin(function () {
    user = Meteor.user(); //TODO: Axe this global.
    if(user.isBanned) {
        //Logout on login
        Meteor.users.update({_id: user._id}, {$set : { "services.resume.loginTokens" : [] }});
    }
});

Avatar.setOptions({
    fallbackType: "initials",
    customImageProperty: function() {
        var user = this;
        // calculate the image URL here
        if (user.avatar)
            return user.avatar;
    }
});<commit_msg>Removed global 'user' in init.js<commit_after>/*
    Agora Forum Software
    Copyright (C) 2016 <NAME>
    License: GPL, Check file LICENSE
*/

Meteor.subscribe('users');
Meteor.subscribe('myself');
Meteor.subscribe('reports');

Accounts.onLogin(function () {
    let user = Meteor.user();
    if (user.isBanned) {
        //Log out user if banned.
        Meteor.users.update({_id: user._id}, {$set : {"services.resume.loginTokens" : []}});
    }
});

Avatar.setOptions({
    fallbackType: "initials",
    customImageProperty: function() {
        var user = this;
        // calculate the image URL here
        if (user.avatar)
            return user.avatar;
    }
});
{'fraction_non_alphanumeric': 0.15212527964205816, 'fraction_numerical': 0.005965697240865026, 'mean_word_length': 2.7486033519553073, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '54716', 'n_tokens_mistral': 445, 'n_tokens_neox': 428, 'n_words': 100}