Title: reset users
Last modified: August 30, 2016

---

# reset users

 *  Resolved [wealthy](https://wordpress.org/support/users/wealthy/)
 * (@wealthy)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/)
 * is there a way to reset users automatically after a certain time?
 * I asked because if I turn my PC off and on and go back in to the chat and use
   same user name to log in with it says “This name is already occupied”
    So I have
   to choose another name.
 * Thanks
 * [https://wordpress.org/plugins/wise-chat/](https://wordpress.org/plugins/wise-chat/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6877850)
 * Hi,
 * username expires after 24 hours and then becomes available for usage again.
 * Unfortunately there is no way to recognize anonymous users (users that are not
   logged in as WordPress users) when PHP session expires. I could probably try 
   to generate long-living cookies, but I will consider it in the future.
 * Thanks
 * Marcin
 *  Thread Starter [wealthy](https://wordpress.org/support/users/wealthy/)
 * (@wealthy)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6877874)
 * Ok great that they expire after 24hours..
    Where can I find the code or what 
   custom code can I use to change this 24 hours to a much less time frame??
 * thanks
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6878028)
 * In src/services/users/WiseChatUserService.php file there is a constant named 
   USERS_PRESENCE_TIME_FRAME. It is set to 86400 seconds (24 hours) currently.
 *  [Cryptic-Designs](https://wordpress.org/support/users/cryptic-designs/)
 * (@cryptic-designs)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6878040)
 * Hello,
 * First of all I would like to say the plugin you made is really awesome! Its the
   perfect plugin I was looking for, however i’ve got a small issue.
 * When people create a name at the plugin (with “Force Username Selection” enabled)
   they can chat easily.
    However once they close the browser and open it again,
   they have to choose a name again and can’t use the one before. I saw the cookie
   settings are setup for 60 days, however looks like the cookie isn’t working properly.
 * Have you got any idea how I could analyse/fix this problem?
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6878042)
 * Hi,
 * thanks!
 * Yes, Wise Chat session is stored in PHP session. Try to set longer session timeout
   for PHP. Settings cookie is an independent thing.
 * In future I will store user in standalone cookie.
 *  [Cryptic-Designs](https://wordpress.org/support/users/cryptic-designs/)
 * (@cryptic-designs)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6878049)
 * Hello,
 * It doesnt matter at which lifetime I set the cookie;
    Once the browser gets closed
   and reopened again the system asks again for a username instead of using the 
   same name. And you can’t choose the same username, since thats already insterted
   inside the DB. Got any idea how this can be caused and fixed?
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/reset-users/#post-6878055)
 * Yes, it is because PHP session ends (PHPSESSID cookie expires) after closing 
   the window. You have to make sure that PHPSESSID cookie does not expire after
   closing the window. Check out session.cookie_lifetime in php.ini configuration.
 *  [frytec](https://wordpress.org/support/users/frytec/)
 * (@frytec)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reset-users/#post-6878100)
 * How can we workaround this name issue?
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reset-users/#post-6878102)
 * It’s not an issue. PHP session on your server has to have longer expiration time.
 *  [frytec](https://wordpress.org/support/users/frytec/)
 * (@frytec)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reset-users/#post-6878105)
 * I changed session.cookie_lifetime and session.gc_maxlifetime to 1 year, cleared
   users table and browser cookies.
 * Looks like the cookie is working now 🙂
 * Do you think this can affect my server performance in any way?
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reset-users/#post-6878106)
 * Sessions are stored as files on your server. If you have a lot of users it could
   reach your disk capacity limits.
 *  [missty](https://wordpress.org/support/users/missty/)
 * (@missty)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/reset-users/#post-6878125)
 * Hi,
 * Great Plugin!
 * Like the others before me I wonder if we could please find a way around the username
   item. It would be great if the username disappeared from the system as soon as
   the window was closed?
 * Then when the user comes back again their username is free.
 * Please find a solution. 24 hours is too long.
 * Thank you! 🙂
 *  Plugin Author [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * (@marcinlawrowski)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/reset-users/#post-6878126)
 * Hi,
 * Yes, I know this is a limitation, but this is hard to achieve in the chat without
   a regular server using WebSockets. I have an idea how to solve this, but still
   haven’t time to implement this (it requires a lot of coding and testing). I can
   assure you that I know that problem and one day I will provide a solution.
 * Thank you

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘reset users’ is closed to new replies.

 * ![](https://ps.w.org/wise-chat/assets/icon-128x128.png?rev=1306481)
 * [Wise Chat](https://wordpress.org/plugins/wise-chat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wise-chat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wise-chat/)
 * [Active Topics](https://wordpress.org/support/plugin/wise-chat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wise-chat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wise-chat/reviews/)

 * 13 replies
 * 5 participants
 * Last reply from: [Marcin](https://wordpress.org/support/users/marcinlawrowski/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/reset-users/#post-6878126)
 * Status: resolved