 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Andrea
Joined: 09 Jan 2008 Posts: 2
|
Posted: Wed Jan 09, 2008 6:45 am Post subject: Problem with auth from DB when username have national chars |
|
|
| A have a problem with PEAR:Auth when username have national chars and i use a MySQL server. I need to set cp1251 encoding for example by "SET NAMES cp1251" by I can't understend how to do it when use this class... Can somebody help me with this problem? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Wed Jan 09, 2008 3:47 pm Post subject: |
|
|
You could initialize the Auth_Storage_DB (or _MDB2) class yourself. This class accepts a DB (or MDB2) instance. And the Auth constructor does not only accept the name of a storage container (e.g. 'DB') but also an already initialized container object. Therefore:
- init DB/MDB2 yourself
- $db->query('SET NAMES ...');
- init Auth_Storage_(M)DB(2) with $db
- init Auth with this container object
(untested, but should work) |
|
| Back to top |
|
 |
Andrea
Joined: 09 Jan 2008 Posts: 2
|
Posted: Thu Jan 10, 2008 5:24 am Post subject: |
|
|
Thank you for a lot!!! Extended class which i wrote work's excellent now!
In it i am also rewrite verifyPassword() function to use a salt field in DB also for authentication. If somebody need i can public it here... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|