by Kami-sama June 22nd 2017, 5:44 pm
Okey. Found the last thing causing me a headache.
For a guest - everything is working great.
Now a logged in user. Basically, if a logged in user goes to HTML login page he can see it. So I need him redirected to the /forum/ Here is what I tried:
- Code:
if(document.URL.indexOf("http://URL/") >= 0){
if(_userdata.session_logged_in){
window.location = "http://URL/forum";
} else {
/*DO NOTHING*/
}
} else {
/*DO NOTHING*/
}
As the HTML login is the main page, its address is just help.forumotion.com/
The if redirects to the forum page: help.forumotion.com/forum
But then if runs again, as there is URL. So loop happens.
Any ideas on this?