# Prevent/Notify a user to login more than once

**URL:** <https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395>\
**Category:** Server Administration - Administration-du-Serveur\
**Tags:** user-stories\
**Created:** [25 May 2022 04:18 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395 "2022-05-25T04:18:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![masgarinia](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/masgarinia/32/35364_2.png) [@masgarinia](https://community.dhis2.org/u/masgarinia)\
**Post date:** [25 May 2022 04:18 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395/1 "2022-05-25T04:18:43Z")

</div>

Hi  
Is it possible to limit user for number of concurrent logins, for example an user permit to login only once with his/her username, if user want to login again while previous session was active the system prompt or notify the user "you have an active session’ or something like this.

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [25 May 2022 18:37 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395/2 "2022-05-25T18:37:41Z")

</div>

Hi @masgarinia,  
Welcome back to the community! 🙏🌺

Please see here [https://community.dhis2.org/t/limiting-number-of-concurrent-session-by-user/47287/4](https://community.dhis2.org/t/limiting-number-of-concurrent-session-by-user/47287/4) **it is possible to control number of concurrent sessions** ; however, the new session will remain and all the other sessions will be logged out (the opposite to your description.)

Is it important which session is kept? At this point it seems like the session that will remain open (if concurrent sessions is kept to 1) is the newest one.

Thanks!

---

<div class="post-metadata">

**Author:** ![masgarinia](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/masgarinia/32/35364_2.png) [@masgarinia](https://community.dhis2.org/u/masgarinia)\
**Post date:** [30 May 2022 04:51 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395/3 "2022-05-30T04:51:49Z")

</div>

Thanks for quick and useful response.  
Witch session is not important, but it may bother for customer to sign-out without knowing about the reason.  
Let me test the configuration.  
Best regards

---

<div class="post-metadata">

**Author:** ![masgarinia](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/masgarinia/32/35364_2.png) [@masgarinia](https://community.dhis2.org/u/masgarinia)\
**Post date:** [25 December 2022 14:25 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395/4 "2022-12-25T14:25:57Z")

</div>

The solution doesn’t work. oops

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [26 December 2022 17:22 UTC](https://community.dhis2.org/t/prevent-notify-a-user-to-login-more-than-once/47395/5 "2022-12-26T17:22:09Z")

</div>

Could you explain further why it’s not working?

Thanks!
