<commit_before>var $ = require('jquery');
var cdb = require('cartodb.js');
var FavMapView = require('./fav_map_view');
var UserInfoView = require('./user_info_view');
var PaginationModel = require('../new_common/views/pagination/model');
var PaginationView = require('../new_common/views/pagination/view');
var UserUrl = require('../new_common/urls/user_model');
var OrgUserUrl = require('../new_common/urls/organization_user_model');
var UserSettingsView = require('./user_settings_view');
var MapCardPreview = require('../new_dashboard/mapcard_preview');
var LikeView = require('../new_common/views/likes/view');

$(function() {
  cdb.init(function() {
    cdb.templates.namespace = 'cartodb/';

    $(document.body).bind('click', function() {
      cdb.god.trigger('closeDialogs');
    });

    var authenticatedUser = new cdb.open.AuthenticatedUser();
    authenticatedUser.bind('change', function() {
      if (authenticatedUser.get('username')) {
        var user = new cdb.admin.User(authenticatedUser.attributes);
        var urlData = {
          user: user,
          account_host: window.account_host
        };
        var currentUserUrl;
        if (user.isOrgAdmin()) {
          currentUserUrl = new OrgUserUrl(urlData);
        } else {
          currentUserUrl = new UserUrl(urlData);
        }
        var userSettingsView = new UserSettingsView({
          el: $('.js-user-settings'),
          model: user,
          currentUserUrl: currentUserUrl
        });
        userSettingsView.render();

        $('.js-login').hide();
        $('.js-learn').show();<commit_msg>Check if user is inside org<commit_after>var $ = require('jquery');
var cdb = require('cartodb.js');
var FavMapView = require('./fav_map_view');
var UserInfoView = require('./user_info_view');
var PaginationModel = require('../new_common/views/pagination/model');
var PaginationView = require('../new_common/views/pagination/view');
var UserUrl = require('../new_common/urls/user_model');
var OrgUserUrl = require('../new_common/urls/organization_user_model');
var UserSettingsView = require('./user_settings_view');
var MapCardPreview = require('../new_dashboard/mapcard_preview');
var LikeView = require('../new_common/views/likes/view');

$(function() {
  cdb.init(function() {
    cdb.templates.namespace = 'cartodb/';

    $(document.body).bind('click', function() {
      cdb.god.trigger('closeDialogs');
    });

    var authenticatedUser = new cdb.open.AuthenticatedUser();
    authenticatedUser.bind('change', function() {
      if (authenticatedUser.get('username')) {
        var user = new cdb.admin.User(authenticatedUser.attributes);
        var urlData = {
          user: user,
          account_host: window.account_host
        };
        var currentUserUrl;
        if (user.isInsideOrg()) {
          currentUserUrl = new OrgUserUrl(urlData);
        } else {
          currentUserUrl = new UserUrl(urlData);
        }
        var userSettingsView = new UserSettingsView({
          el: $('.js-user-settings'),
          model: user,
          currentUserUrl: currentUserUrl
        });
        userSettingsView.render();

        $('.js-login').hide();
        $('.js-learn').show();
{'fraction_non_alphanumeric': 0.1553398058252427, 'fraction_numerical': 0.0, 'mean_word_length': 3.148051948051948, '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': '7658323', 'n_tokens_mistral': 957, 'n_tokens_neox': 931, 'n_words': 166}