# Check if user logged in globally

**URL:** <https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049>\
**Category:** Ignition\
**Created:** [June 24, 2019, 7:57am UTC](https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049 "2019-06-24T07:57:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 24, 2019, 7:57am UTC](https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049/1 "2019-06-24T07:57:52Z")

</div>

I have had an odd request from a customer to not allow changes to an individual’s configuration while they are logged in on any client. Not sure of the context at this stage as it’s 2nd-hand info.

However, is it possible to check if a user is logged into _any_ client?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 24, 2019, 11:14am UTC](https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049/2 "2019-06-24T11:14:23Z")

</div>

[https://docs.inductiveautomation.com/display/DOC79/system.util.getSessionInfo](https://docs.inductiveautomation.com/display/DOC79/system.util.getSessionInfo)

```python
checkUser = 'jordancclark'
# Get Users that are logged in. Using a set will give unique usernames. 
userSet = set([row['username'] for row in system.util.getSessionInfo() if not row['isDesigner']]) 

userLoggedIn = checkUser in userSet

print userLoggedIn
```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 24, 2019, 11:19am UTC](https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049/3 "2019-06-24T11:19:57Z")

</div>

You can shorten it to this if you are only checking for one user. So a couple of different options.

```python
userLoggedIn = len(system.util.getSessionInfo(checkUser))>0

```

EDIT: Note that this will not filter out designer sessions.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 24, 2019, 11:35am UTC](https://forum.inductiveautomation.com/t/check-if-user-logged-in-globally/26049/4 "2019-06-24T11:35:07Z")

</div>

Awesome, thanks for the help 🙂
