Forum logs me out around every hour
4 posters
Page 1 of 1
Forum logs me out around every hour
Hello!
Unsure if my topic is for this category, but I will post it here.
I know that every month the forum logs out the accounts, but this month I'm getting kicked out of my account every hour or so (today at least 4 times). When I become "inactive" (refresh forum for hour or so), it just kicks me out.
The forum automatically have the option for auto log in every time you open enabled. Its checked, so its not that too.
I decided to test that if its something related to my browser (cleared cache and etc), but no - I get kicked out from Opera, Google Chrome and Brave (none of other members of the forum have that problem...on phone - its all fine too, no random log outs). I got twice, i believe, kicked out from this forum here too, so its not just my forum that make the problem, seems like.
First I though it may be some bug or something, or like the usual "every month it logs us out" but seems like its not that. I dont know if new added code for Switch Accounts can be related to this problem, so i will provide the code too. But again - noone other of my members experience this. I saw another recent topics with same problem.
This is the code for switch accounts widget:
Link to the forum as i assume you would like to inspect: https://odnovreme.forumotion.eu
Version phpBB2.
Thanks in advance for help and will keep updated if another forum (beside the provided one) kicks me out after some time.
Unsure if my topic is for this category, but I will post it here.
I know that every month the forum logs out the accounts, but this month I'm getting kicked out of my account every hour or so (today at least 4 times). When I become "inactive" (refresh forum for hour or so), it just kicks me out.
The forum automatically have the option for auto log in every time you open enabled. Its checked, so its not that too.
I decided to test that if its something related to my browser (cleared cache and etc), but no - I get kicked out from Opera, Google Chrome and Brave (none of other members of the forum have that problem...on phone - its all fine too, no random log outs). I got twice, i believe, kicked out from this forum here too, so its not just my forum that make the problem, seems like.
First I though it may be some bug or something, or like the usual "every month it logs us out" but seems like its not that. I dont know if new added code for Switch Accounts can be related to this problem, so i will provide the code too. But again - noone other of my members experience this. I saw another recent topics with same problem.
This is the code for switch accounts widget:
- Code:
<script type="text/javascript">
function switch_accounts() {
jQuery.get(document.getElementById('logout').href, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
</script>
<div align="center">
<hr /><input id="switch_uname" type="text" /> <input id="switch_pass" type="password" />
<hr /><input type="button" value="Смени" onclick="switch_accounts();" />
<hr />
</div>
Link to the forum as i assume you would like to inspect: https://odnovreme.forumotion.eu
Version phpBB2.
Thanks in advance for help and will keep updated if another forum (beside the provided one) kicks me out after some time.
ThePumpkin- New Member
- Posts : 15
Reputation : 1
Language : Bulgarian
Re: Forum logs me out around every hour
Do you have any JavaScripts, modified templates, etc? If yes, do the issue disappears when you turn of the modifications?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Forum logs me out around every hour
Thats the JavaScripts we have, they never made problem related to random log off.
Nothing but new widgets was added in the forum when this issue started (only on my side).
Now for few hours i didnt got kicked out, till now (its role play forum so i was writing a post for past around 2 hours and it kicked me out of my profile). Was thinking to wait till the morning to see if it logs me off but..it did it randomly now.
The issue is kind of random event - when it will kick me or not, so turning off all added stuff, because only 1 person is suffering the issue (and if these things - JavaScripts and other modfications - was making problems, it would happen past 4-5 months too). Because of that I ask if the log in widget (code i posted) is the one causing trouble, somehow.
Edit: The scripts are basically what say in title - more colors for the topics, word counter and script providing link to specific post in a topic.
ThePumpkin- New Member
- Posts : 15
Reputation : 1
Language : Bulgarian
Re: Forum logs me out around every hour
So it is only happening to you?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Forum logs me out around every hour
Good morning!
I have installed your code on the test forum. As in your case, the system did not remember my authorization and I had to log in again.
I checked the request to the server when we select the "Log in automatically" feature and it looks like this:
As you can see, the "autologin" parameter is also passed, but your code does not have this parameter.
You only pass on the login and password. This code corresponds to a POST request for authorization without the "Log in automatically" function activated.
Add
to your POST request:
I have installed your code on the test forum. As in your case, the system did not remember my authorization and I had to log in again.
I checked the request to the server when we select the "Log in automatically" feature and it looks like this:
As you can see, the "autologin" parameter is also passed, but your code does not have this parameter.
- Code:
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value
You only pass on the login and password. This code corresponds to a POST request for authorization without the "Log in automatically" function activated.
Add
|
- Code:
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&autologin=on&password='+document.getElementById('switch_pass').value
Razor12345- Support Moderator
- Posts : 1583
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Re: Forum logs me out around every hour
SLGray wrote:So it is only happening to you?
Yes, it was happening only to me. I ask other members - noone seems to experience the issue.
Razor12345 wrote:Good morning!
Thank you so much for the help! I put that in the code, will keep eye on the forum and if random kicks happen again. If not i will mark the topis as Solved.
ThePumpkin- New Member
- Posts : 15
Reputation : 1
Language : Bulgarian
Re: Forum logs me out around every hour
Little update - Forum kicked me out again, even after the change in the code (unless i didnt do it correctly)
ThePumpkin- New Member
- Posts : 15
Reputation : 1
Language : Bulgarian
Re: Forum logs me out around every hour
Today there wasnt any problems, so i will count this as Solved.
Thank you Razor for the code fix! And thanks to the administrators of course!
Thank you Razor for the code fix! And thanks to the administrators of course!
ThePumpkin- New Member
- Posts : 15
Reputation : 1
Language : Bulgarian
Ape and Razor12345 like this post
Re: Forum logs me out around every hour
That's great!
I wanted to post at the end of the day that I can't display the problem on my test forum and on yours.
I wanted to post at the end of the day that I can't display the problem on my test forum and on yours.
Problem solved & topic archived.
|
Razor12345- Support Moderator
- Posts : 1583
Reputation : 268
Language : Ukr, Rus, Eng
Location : Ukraine
Ape and ThePumpkin like this post
Similar topics
» How to avoid losing a newsletter after an hour of typing
» Time is an hour off
» PLEASE HELP ME.I RECEIVED THIS EMAIL 1 HOUR AGO!!!!
» Chatbox Logs
» IP logs
» Time is an hour off
» PLEASE HELP ME.I RECEIVED THIS EMAIL 1 HOUR AGO!!!!
» Chatbox Logs
» IP logs
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum