   return handleClientIdNotFound res, req  unless clientId
 
   # validating req params
-  { error, token, username, email, firstName, lastName } = validateRequest req
+  { error, token, username, email
+    firstName, lastName, suggestedUsername } = validateRequest req
+
   return sendApiError res, error  if error
 
   client   = null

validateRequest = (req) ->

  token = null
  { username, email, firstName, lastName } = req.body

  unless email
    return { error : apiErrors.invalidInput }

  unless token = checkAuthorizationBearerHeader req
    return { error : apiErrors.unauthorizedRequest }

  return { error : null, token, username, email, firstName, lastName }


  checkAuthorizationBearerHeader } = require '../../helpers'
{ sendApiError
  sendApiResponse
  isUsernameLengthValid
  checkApiTokenAvailability
  isSuggestedUsernameLengthValid } = require './helpers'


module.exports = createUser = (req, res, next) ->
