, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Stay logged in across browser sessions

FlexCMS Support Forum


Stay logged in across browser sessions
Started November 20, 2007 @ 11:04am by Wolf
Post Message 
Wolf




Posts: 65
 
Stay logged in across browser sessionsNovember 20, 2007 @ 11:04am
Is there something I can do to tweak this...

I noticed this when I login and check the "Stay logged in across browser sessions" option on the login page.

I login, do some stuff and then close my browser session.

Launch a new browser window and enter the following:

http://www.-my-domain-name-.com and I'm sucessfully back in my site without re-logging in.

When I launch a new browser window and enter the following:

http://-my-domain-name-.com and I am forced to re-login to my site.

Notice the second time I didn't specify the "WWW."

Is there a way to tweak the cookie so that I can return either way and still stay logged in?

Thanks! Smile
 
Wolf




Posts: 65
 
Domain parameter of php setcookie() functionNovember 20, 2007 @ 11:54am
Would something like this work?

http://209.85.165.104/search?q=cach...e.com%22&hl=en&ct=clnk&cd=116&gl=us

setcookie(name,value,expire,path,domain,secure)

Where "domain": Optional. Specifies the domain name of the cookie.
To make the cookie available on all subdomains of example.com then you'd set it to ".example.com". Setting it to www.example.com will make the cookie only available in the www subdomain

setcookie("TestCookie", $value, time()+3600*24, "/", ".mydomain.com");





 
DCSun
Administrator



Posts: 625
 
November 20, 2007 @ 1:23pm
Yes, I believe that would work if you need to make that change for your site.

The other thing that's worth noting, and may solve your problem, is that although the initial page you hit shows you as not being logged in, if you click on any link on that page you'll return to the site's main URL (with the www.), which will have you logged in again.


David


FlexCMS v3.2 Has Been Released!
 
Wolf




Posts: 65
 
ThanksNovember 20, 2007 @ 8:57pm
Hi David,

Thanks for your speedy reply!

I'm thinking in terms of users, who someimtes might use "www" and other times not -- they may think they are not still logged in.

Flex rocks!

Cheers,
Wolf
 
DCSun
Administrator



Posts: 625
 
November 21, 2007 @ 2:35pm
Wolf,

If you're concerned about people using one instead of the other, you can also tweak your site's DNS settings to redirect users to the www. when they enter the domain without it. You'd have to talk to your hosting company about that, though, since it's not really FlexCMS related and depends on the exact setup of the server.


David


FlexCMS v3.2 Has Been Released!
 
Wolf




Posts: 65
 
:-)November 21, 2007 @ 3:14pm
Great, thank you!
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.11338 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS