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
-
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
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
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.
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?
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.
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?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.
How can we workaround this name issue?
It’s not an issue. PHP session on your server has to have longer expiration time.
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?
Sessions are stored as files on your server. If you have a lot of users it could reach your disk capacity limits.
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! π
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
The topic ‘reset users’ is closed to new replies.