Hi.
Could you please suggest an authentication class for use with cookies and sessions?
I want the user to be logged in when he revisits and not log out and session_destroy when he closes the browser. I do this through cookies.
Thanks,
John
Hi.
Could you please suggest an authentication class for use with cookies and sessions?
I want the user to be logged in when he revisits and not log out and session_destroy when he closes the browser. I do this through cookies.
Thanks,
John
Yes use patUser (http://www.php-tools.de/)
there is also a good article about using this class on http://www.devshed.com/Server_Side/PHP
...or PEAR::Auth (http://pear.php.net/package/Auth)
As far as i've studied PEAR::Auth, it doesn't provide ways of authorizing using cookies and sessions for writing data.
John
use patuser, it works very good (with sessions)
Originally posted by johnie
As far as i've studied PEAR::Auth, it doesn't provide ways of authorizing using cookies and sessions for writing data.
John
// {{{ start()
/**
* Start new auth session
*
* @access public
* @return void
*/
function start()
{
$this->assignData();
session_start();
if (!$this->checkAuth()) {
$this->login();
}
}
// }}}
i wonder how that got in there. strange.
Yes it looks like that Pear use sessions too...
(from the manual)
Auth::setSessionname() -- set a custom session name
jmcneese,
do you work a lot with pear?
(after a short look about the auth class it seems to be very easy to use, with plenty of info’s...)
do you work a lot with pear?
yes, quite a bit actually. i've got an MVC (sort of) app that uses several PEAR classes....let's see:
Auth
Benchmark
Cache
DB
i'm looking into LiveUser to replace my current use of phpgacl, since it uses ADODB, and it's a bit silly to have two DB abstraction layers in one application.