[SOLVED] Stay connecting after close browser?

Hi

I use “Remember me” option, but when I close my browser and open it after, if I load my menu page I have a error message (pop up) with message : user not authorized.

How is it possible to reconnect member if he load menu page and not login page?

Thanks

Hi,

You cannot go to the menu directly, you have to execute sc_validate_success
You can find it in PHP Methods in the Login app.

Hello

Thank you for your answer.

I find it in “On Load” from My menu :

So I pasted code from sc_validate_sucess into

Now I can go to menu directly (YEAH !) but I have yet the same pop up (in french) “Unauthorized user” before.

Why ?

Thanks

Turn off Security for the menu or call a Blank (with security turn off) contenning sc_validate_success before redirecting Menu

Hmmm ok I see.

It’s not possible launch sc_validate_success before this error message directly into menu ?

Security off on menu is a good practice ?

Thanks

Hmmm look, I don’t really need security with this code anyway?

OnApplication Init (in my Menu) :

  if (isset($_COOKIE['usr_data']) && $_COOKIE['usr_data'] >= time()) {
	} else {
	if(isset($_COOKIE['PHPSESSID'])) {
			unset($_COOKIE['PHPSESSID']);
			setcookie('PHPSESSID','',time()-3600,'/');
		} 
	sc_redir('adm_Login');
}

Thank you very much !

It’s not the best practice, but the menu usually don’t contain any important information

1 Like