PEAR::Auth question

From: Date: Thu, 19 May 2005 21:42:09 +0000
Subject: PEAR::Auth question
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19285@lists.php.net to get a copy of this message
First let me tell you that I really dig the Auth package. Nicely done. I may be pushing the limitations of the package, or just using it wrong, but either way I have a problem. I am using PHP5 (on Win atm) Is it possible to have two separate instances of the Auth object? For example... // Talent Auth instance $params = array( "dsn" => $strDSN, "table" => "talent_Auth", "usernamecol" => "username", "passwordcol" => "password" ); $objTalentAuth = new Auth("DB", $params, '', false); $objTalentAuth->setSessionname('PTN_Talent_Session'); $objTalentAuth->start(); // Agency Auth instance $params = array( "dsn" => $strDSN, "table" => "agency_Auth", "usernamecol" => "username", "passwordcol" => "password" ); $objAgencyAuth = new Auth("DB", $params, '', false); $objAgencyAuth->setSessionname('PTN_Agency_Session'); $objAgencyAuth->start(); The problem is that when a Talent logs in, the Agency instance checkAuth() and getAuth() functions return true as well. Furthermore, calling getUsername() on either instance returns the username used when logging in a talent. I thought that setting the session names would allow this to work. Any ideas on why this is happening and a possible solution? I really would prefer to keep these two entities in their own auth tables, as there will be some users that can log in to both sections using the same credentials. Also, if I need to post this on a msg board somewhere please let me know. I appreciate your help and all your hard work on this package. Thank you, -- R. Lee Wixson ThoughtProcess.net

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