 jraphical = require 'jraphical'
+Regions   = require 'koding-regions'
 
 Flaggable = require '../../traits/flaggable'
 

      guestsGroup.removeMember account, callback

  @convert = secure (client, userFormData, callback) ->
    { connection, sessionToken : clientId } = client
    { delegate : account } = connection
    { nickname : oldUsername } = account.profile
    { username, email, firstName, lastName, locationData
      agree, inviteCode, referrer, password, passwordConfirm } = userFormData

    if not firstName or firstName is "" then firstName = username
    if not lastName then lastName = ""

    if password isnt passwordConfirm
      return callback createKodingError "Passwords must match!"

    if clientIP
      { ip, country, region } = Regions.findLocation clientIP

    newToken       = null
    invite         = null
