<commit_before>share.getMailDomail = ->
  matches = Meteor.settings.mailUrl.match(/\/\/(.+)%40(.+):(.+)@(.+):(\d+)/)
  matches[2]

Meteor.methods
  setPassword: (userId, password) ->
    check(userId, String)
    check(password, String)
    unless share.Security.hasRole(@userId, "admin")
      throw "Setting password is not allowed for non admins"
    Accounts.setPassword(userId, password)
  addNewUser: (newUser) ->
    check newUser,
      email: Match.App.Email
      name: String
      password: String
      group: Match.App.InArray(share.Security.groups())
    userId = Accounts.createUser
      email: newUser.email
      password: <PASSWORD>
      profile:
        name: newUser.name
    Meteor.users.update(userId, {$set: {group: newUser.group}})
    user = Meteor.users.findOne(userId)
    Email.send
      from: '"' + root.i18n.t("messages.postman") + ' (FlowBAT)" <herald@' + share.getMailDomail() + '>'
      to: newUser.email
      subject: Handlebars.templates["newUserSubject"](user: user, settings: Meteor.settings).trim()
      html: Handlebars.templates["newUserHtml"](user: user, email: newUser.email, password: <PASSWORD>, settings: Meteor.settings).trim()
    userId
<commit_msg>Fix capitalization<commit_after>share.getMailDomail = ->
  matches = Meteor.settings.mailUrl.match(/\/\/(.+)%40(.+):(.+)@(.+):(\d+)/)
  matches[2]

Meteor.methods
  setPassword: (userId, password) ->
    check(userId, String)
    check(password, String)
    unless share.Security.hasRole(@userId, "admin")
      throw "Setting password is not allowed for non admins"
    Accounts.setPassword(userId, password)
  addNewUser: (newUser) ->
    check newUser,
      email: Match.App.Email
      name: String
      password: String
      group: Match.App.InArray(share.Security.groups())
    newUser.email = newUser.email.toLowerCase()
    userId = Accounts.createUser
      email: newUser.email
      password: <PASSWORD>
      profile:
        name: newUser.name
    Meteor.users.update(userId, {$set: {group: newUser.group}})
    user = Meteor.users.findOne(userId)
    Email.send
      from: '"' + root.i18n.t("messages.postman") + ' (FlowBAT)" <herald@' + share.getMailDomail() + '>'
      to: newUser.email
      subject: Handlebars.templates["newUserSubject"](user: user, settings: Meteor.settings).trim()
      html: Handlebars.templates["newUserHtml"](user: user, email: newUser.email, password: <PASSWORD>, settings: Meteor.settings).trim()
    userId

{'fraction_non_alphanumeric': 0.15522145469321413, 'fraction_numerical': 0.0040633888663145065, 'mean_word_length': 3.4927007299270074, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '4081481', 'n_tokens_mistral': 811, 'n_tokens_neox': 802, 'n_words': 155}