<commit_before>// --------------------
// Account namespace controller
// edit action
// --------------------

// libraries
var forms = require('../../../../../lib/forms');

// imports
var defaultActionEdit = require('../../resource/edit');

// exports

// action definition
exports = module.exports = {
	// action params
	actionTypes: {
		form: true
	},
	
	title: 'Change Account Details',
	
	// functions
	
	initForm: function() {
		// make form
		this.form = forms.createFormFromModel(this.route.overlook.models.user);
		
		// remove form fields
		delete this.form.fields.type;
		delete this.form.fields.isActive;
	},
	
	load: function() {
		return this.route.actions.index.load.call(this);
	},
	
	populate: defaultActionEdit.populate,
	
	act: function() {
		// init actResult
		this.actResult = {};
		
		// record user id and date<commit_msg>Account edit action not load user associations<commit_after>// --------------------
// Account namespace controller
// edit action
// --------------------

// libraries
var forms = require('../../../../../lib/forms');

// imports
var defaultActionEdit = require('../../resource/edit');

// exports

// action definition
exports = module.exports = {
	// action params
	actionTypes: {
		form: true
	},
	
	title: 'Change Account Details',
	
	// functions
	
	initForm: function() {
		// make form
		this.form = forms.createFormFromModel(this.route.overlook.models.user);
		
		// remove form fields
		delete this.form.fields.type;
		delete this.form.fields.isActive;
	},
	
	load: function() {
		return this.models.user.find({where: {id: this.user.id}}).bind(this)
		.then(function(user) {
			this.dataMain = this.data.user = user;
		});
	},
	
	populate: defaultActionEdit.populate,
	
	act: function() {
		// init actResult
		this.actResult = {};
		
		// record user id and date
{'fraction_non_alphanumeric': 0.19801980198019803, 'fraction_numerical': 0.0, 'mean_word_length': 2.425612052730697, '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': '1784276', 'n_tokens_mistral': 589, 'n_tokens_neox': 528, 'n_words': 127}