# User Management: onCreateUser extension function -\> get username

**URL:** <https://forum.inductiveautomation.com/t/user-management-oncreateuser-extension-function-get-username/28084>\
**Category:** Ignition\
**Created:** [September 6, 2019, 6:00pm UTC](https://forum.inductiveautomation.com/t/user-management-oncreateuser-extension-function-get-username/28084 "2019-09-06T18:00:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 6, 2019, 6:00pm UTC](https://forum.inductiveautomation.com/t/user-management-oncreateuser-extension-function-get-username/28084/1 "2019-09-06T18:00:31Z")

</div>

I’m using the user management component, and I am wanting to run some script in the `onCreateUser` extension function that needs access to the username field of the new user. Is there a way to access this value during the creation process?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 6, 2019, 6:41pm UTC](https://forum.inductiveautomation.com/t/user-management-oncreateuser-extension-function-get-username/28084/2 "2019-09-06T18:41:23Z")

</div>

I realized that the onCreateUser ext function happens before any information has been entered. I guess I will have to use the onSaveUser, and somehow determine if the user is new or already existed.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 6, 2019, 6:52pm UTC](https://forum.inductiveautomation.com/t/user-management-oncreateuser-extension-function-get-username/28084/3 "2019-09-06T18:52:00Z")

</div>

I figured it out. I’m creating tags in association to the users. I will use `system.tag.exists()`, to check and see if the user that is being saved exists. If not, then the user is new and I will run the code to generate their tags. 🙂
