RE: [PEAR] How to create test table for auth

From: Date: Thu, 13 Mar 2003 22:24:22 +0000
Subject: RE: [PEAR] How to create test table for auth
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4219@lists.php.net to get a copy of this message
I figured out that if I use the echo md5("password"); Command and then copy and paste this value into my database, then try to log in, everything works fine. So it would seem that Auth does not allow access if there is no password specified in the database. Can someone confirm this? Peter Meth -----Original Message----- From: Peter Meth [mailto:pmeth@softersoftware.com] Sent: Wednesday, March 12, 2003 9:25 PM To: pear-general@lists.php.net Subject: [PEAR] How to create test table for auth Just started using Auth 1.2.0. I tried to put together a sample page. I used the example from Auth.php lines 73-105. When I run it I see the default Auth login screen. I created a table called users and set username as 'user1', with no password. When I try to log in, it says 'Wrong Login data' + the rest of the login screen. Here's my code if this helps: require_once "Auth/Auth.php"; $dsn = "mysql://username:password@localhost/database"; $options = array( 'table' => 'users', 'dsn' => $dsn ); $a = new Auth("DB",$options); $a->start(); if ($a->getAuth()) { echo "Welcome user ".$a->getUsername()."!<br />\n"; } Any help? Peter Meth

« previous php.pear.general (#4219) next »