'Twas brillig, and Eric Haskins at 15/01/09 05:51 did gyre and gimble:
Hello can anyone tell me the best way to accomplish this? I am porting a
legacy app I maintain to use MVC. On the auth query I join a customer info
table to store some other info in the session.
// Login Attempt
$sql = "SELECT
*,
UNIX_TIMESTAMP(renew) AS renew_unix,
UNIX_TIMESTAMP(signup) AS signup_unix
FROM
`users`
LEFT JOIN `users_info` USING (userid)
WHERE
username = '".clean_string('username')."'
AND
passwd =
'".md5(clean_string('passwd'))."'";
$res = $db->get_row($sql);
How can I port this for use Zend_Auth so the additional info is stored in
the Auth or should I just suck it up and combined users_info and users.
Thx for any ideas
I had a similar problem which I was tempted to code a fix for but in the
end I just created a VIEW in MySQL (I'm using v5) which did the join so
the Zend_Auth_Adapter_DbTable could just see the data like a single "table".
Dunno if that will work for you tho'.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]