<commit_before>package modelhelper

import (
	"koding/db/models"
	"koding/db/mongodb"
)

func GetAccountById(id string) (*models.Account, error) {
	account := new(models.Account)
	err := mongodb.One("jAccounts", id, account)
	if err != nil {
		return nil, err
	}

	return account, nil
}<commit_msg>Moderation:  CheckAccountExistence is added to accounts helper<commit_after>package modelhelper

import (
	"koding/db/models"
	"koding/db/mongodb"
)

func GetAccountById(id string) (*models.Account, error) {
	account := new(models.Account)
	return account, mongodb.One("jAccounts", id, account)
}

func CheckAccountExistence(id string) (bool, error) {
	var exists bool
	query := checkExistence(id, &exists)
	return exists, mongodb.Run("jAccounts", query)
}
{'fraction_non_alphanumeric': 0.129973474801061, 'fraction_numerical': 0.0, 'mean_word_length': 5.452991452991453, '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': '5209805', 'n_tokens_mistral': 267, 'n_tokens_neox': 257, 'n_words': 63}