'POST /api/users
Returns a dictionary of information about the created user.
:       param key: the current Galaxy admin user\'s API key
The following parameters are included in the payload.
:param email (required): the email address of the user
:param password (required): the password of the user
:param username (required): the public username of the user'

@web.expose_api
@web.require_admin
def create(self, trans, payload, **kwd):

    user_dict = dict(message='', status='ok')
    email = payload.get('email', '')
    password = payload.get('password', '')
    username = payload.get('username', '')
    message = self.__validate(trans, email=email, password=password, confirm=password, username=username)
    if message:
        message = ('email:    %s,    username:    %s    -    %s' % (email, username, message))
        user_dict['message'] = message
        user_dict['status'] = 'error'
    else:
        user = self.__create_user(trans, email, username, password)
        user_dict = user.to_dict(view='element', value_mapper=self.__get_value_mapper(trans))
        user_dict['message'] = ("User    '%s'    has    been    created." % str(user.username))
        user_dict['url'] = web.url_for(controller='users', action='show', id=trans.security.encode_id(user.id))
    return user_dict
