|
Re: Auth: two instances on the same page: msg#00326php.pear.general
On Wed, 19 Nov 2003 17:11:36 +0100, Jeroen Houben wrote: > Hi, > > > Is it possible to have two instances of Auth running on the same > page? Of course it is, I've added a patch to set the session name few months ago. ======================= $auth1Params = array( 'table' => 'table1', 'usernamecol' => 'col1', 'passwordcol' => 'pwdcol1', 'dsn' => $dbinfo, 'sessionName' => '_AuthSession1' ); $auth2Params = array( 'table' => 'table2', 'usernamecol' => 'col2', 'passwordcol' => 'pwdcol2', 'dsn' => $dbinfo, 'sessionName' => '_AuthSession2' ); $auth1 = new Auth('MDB', $auth1Params, 'loginFunction'); $auth1->start(); $auth2 = new Auth('MDB', $auth2Params, 'loginFunction'); $auth2->setSessionname('PHP_AUTH2_SESS'); $auth2->start(); if ($auth1->checkAuth()) { // some code } if ($auth2->checkAuth()) { // some other code } ======================= This should work. HTH Lorenzo -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: MDB with MS sql server: 00326, Thierry Bothorel |
|---|---|
| Next by Date: | dreamweaver templates: 00326, Ryan King |
| Previous by Thread: | Auth: two instances on the same pagei: 00326, Jeroen Houben |
| Next by Thread: | Re: Auth: two instances on the same page: 00326, Jeroen Houben |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |