# HomeyScript event data -\> Current User

**URL:** <https://community.homey.app/t/homeyscript-event-data-current-user/48394>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [June 13, 2021, 12:46pm UTC](https://community.homey.app/t/homeyscript-event-data-current-user/48394 "2021-06-13T12:46:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwin\_VC](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_vc/32/41775_2.png) [@Edwin\_VC](https://community.homey.app/u/Edwin_VC)\
**Post date:** [June 13, 2021, 12:46pm UTC](https://community.homey.app/t/homeyscript-event-data-current-user/48394/1 "2021-06-13T12:46:54Z")

</div>

I’ve been using Homey for a couple of years already just to find out recently the option for adding HomeyScript in the mix of flows. Great feature - already know how to write js so lets do this.

My first requirement would be to be able to check if the user who is changing the on-off state of a device is a parent-user or a child user. I am kinda micro-managing the time spend on digital devices for my children. Time-locks and all the works, Homey also has a share in switching lights and other devices.

But I am having trouble to get a handle on the data that is part of the ‘event’ of switching a device state and the flow that is started as result of this event. I want to be able to get the ‘current user’ or something like that, allowing me to implement a switch-statement and return true or false based on the username or id.

Any help into discovering the options is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 13, 2021, 4:14pm UTC](https://community.homey.app/t/homeyscript-event-data-current-user/48394/2 "2021-06-13T16:14:15Z")

</div>

> [@Edwin\_VC](#):
>
> I want to be able to get the ‘current user’ or something like that

That’s not possible, AFAIK Homey doesn’t keep track which user started which flow/action.
