# How to create users while registering with different roles via API?

**URL:** <https://community.dreamfactory.com/t/how-to-create-users-while-registering-with-different-roles-via-api/2190>\
**Category:** Users & Roles\
**Created:** [February 14, 2016, 10:21am UTC](https://community.dreamfactory.com/t/how-to-create-users-while-registering-with-different-roles-via-api/2190 "2016-02-14T10:21:05Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![juniorconte](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/juniorconte/32/1007_2.png) [@juniorconte](https://community.dreamfactory.com/u/juniorconte)\
**Post date:** [February 16, 2016, 12:10am UTC](https://community.dreamfactory.com/t/how-to-create-users-while-registering-with-different-roles-via-api/2190/10 "2016-02-16T00:10:00Z")

</div>

Apparently it’s a bug and is already registered:

> <https://github.com/dreamfactorysoftware/dreamfactory/issues/32>
>
> Hi,
> 
> In the version 2.1.2 in the post\_process custom script the "event.response.…content" is not reflecting the data pushed to it.
> 
> This is how the issue can be replicated:
> \- create a table "test" on a mysql database
> \- set a script for the post process "db.\_table.test.post.post\_process", with this content:
> 
> \`\`\`
> event.response.status\_code = 400;
> event.response.content = {"test": "value"};
> \`\`\`
> 
> Push a record on the table. The expected result should be a 400 code response and {"test": "value"} as an output. 
> Instead, the return code is modified correctly, but not the response.content, that will return always the original response.
> 
> Please advise.
> Best regards
> 
> Gabriel

> [@Changes in response doesn't stick](https://community.dreamfactory.com/t/changes-in-response-doesnt-stick/2178):
>
> I’m having some difficulties trying to change the response from a GET request. In the get.post\_proccess for a given table I’m modifying the event.response object but the changes doesn’t stick! Here is a simple example to illustrate what is happening. If I use this script in the get.post\_process of a table, it has no effect: event.response = ""; OR event.response = {} (By “no effect” I mean I get all the records as if the response were not changed) This script has the same result (no effect t…

---

_[View the full topic](https://community.dreamfactory.com/t/how-to-create-users-while-registering-with-different-roles-via-api/2190)._
