13, February 2012

Remember doesnt seem to remember - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Remember doesnt seem to remember
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Remember doesnt seem to remember  (Read 900 times)
I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« on: Oct 12, 2009, 09:34:45 pm »

I have started to look at using PHP userClass for my web application.  So far things work good.  I have noticed that using example1.php the "remember me" does not seem to work.  If a get what remember me means:  I login at example1.php, then i close the browser(quit), then restart the browser, navigate back to example1.php it should not ask for a login because is should remember me, but it asks to login again.  it has not remembered me.  Is there extra code that I would need to add to properly integrate "remember me"?

have I gotten the concept of "remember me" wrong?

thanks.
-ChazZ
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5778
46265 credits
Members referred : 3



« Reply #1 on: Oct 12, 2009, 09:39:24 pm »

This probably is a problem because you are using the site in localhost(it's a security limitation of the web browser). It should work on a production server on a real domain.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« Reply #2 on: Oct 12, 2009, 09:50:36 pm »

Thanks for the tip, i was unaware of that limitation.  A simple fix would be to point a "testdomain.com"  to localhost(127.0.1.1) or something in the local machine's hosts file and navigate that way rather than using localhost.

thank you.
I crack Photoshop!
*
Posts: 3
22 credits
Members referred : 0


« Reply #3 on: Oct 12, 2009, 10:13:03 pm »

on a side note, the logout() was not logging me out after i had checked the "remember me" box.  so i had to tack on a little extra " '/', $this->remCookieDomain" to the end of the setcookie() call in the logout function.  (using php 5.2.6).

now reads:
Code:
setcookie($this->remCookieName, '', time()-3600, '/', $this->remCookieDomain);

logs a remembered user out.

-ChazZ
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5778
46265 credits
Members referred : 3



« Reply #4 on: Oct 13, 2009, 12:54:17 pm »

Looks like you discovered a bug. Hope to find some free time to make a new release (hopefully in php5 that time)

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=9201
Tags : remember persistant login php userclass Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: Remember doesnt seem to remember
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 13, 2012, 06:41:52 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.