Thursday, April 12, 2012

Zend Auth - Using two tables

I'm currently developing a website in Zend Framework wich uses Zend_Auth. The current design of the database is the following:




  • users - id / email

  • users_props - id - user_id - prop_name - prop_value



However, the current Zend_Auth_Adapter_DbTable uses only one table, as where I have to tables and need to join them.



How on earth can I do this? As far as i'm concerned, there are three options:




  1. I somehow create a (mysql) view

  2. I change the design so the users table contains both username/password

  3. I rewrite the Zend_Auth_Adapter_DbTable to a Custom_Auth_Adapter_DbTabe



Can anyone point me out what the best practise is?



Thanks in advance :)





No comments:

Post a Comment