Php / pear package for "remember me on this computer"

I know this is usually done with cookies, but I am getting unpredictable results in different browsers and decided to look for a pear package that focuses on this. Just wondering if there is a package (like HTTP_Client?) That someone had success with for this particular situation. Or, really, people never or rarely have problems with the routine of manually setting and checking cookies? Is the common use of the cookie package?

+1


source to share


1 answer


There is such functionality in PEAR :: LiveUser , although I strongly believe it would be overkill. Here's a description of the features you are requesting from end users :

setRememberCookie [line 1326] bool setRememberCookie (line $ handle, string $ passwd)

If cookies are allowed, this method checks if the user wants the cookie to be set so that he doesn't have to enter a pen and password for his next login. If true, it will install the cookie.

* Return: true if the cookie can be set, false otherwise
* Access: public

      

Parameters: string $ handle -
handle of the user trying to authenticate string $ passwd -
password of the user trying to authenticate



How about cookie validation is giving you problems? You could use www or non-www, subdomain vs. domain or any number of logical problems. I remember working on a PHP authentication system that did exactly what you are doing, but I also remember that this is a bear to work on. Of course, your mileage may vary. :)

+1


source







All Articles