Auth/Adapter/Db.php
\Conjoon_Auth_Adapter_Db
Package: Conjoon\Model
Returns
Throws
Adapter for checking for authentication credentials in a database.
- Parent(s)
- ?\Zend_Auth_Adapter_Interface
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Zend_Auth_Adapter_Interface
Properties
Methods

__construct(
string $userName, string $password
)
:
voidConstructor.
Parameters
| Name | Type | Description |
|---|---|---|
| $userName | string | The username to lookup in the database. |
| $password | string | The password to lookup in the database. |

authenticate(
)
:
\Zend_Auth_ResultThis emthod will authenticate a user against a database table.
It will also generate a login token that is generated during the login process and will be stored in the db table. The token should then be written into the session - before dispatching any request, it is advised to check whether the session stored token still equals to the token stored in the database - if not, it is likely that another login occured with this user credentials. We assume that the controller set the default adapter for all database operations, thus is available without futher specifying it.
| Type | Description |
|---|---|
| \Zend_Auth_Result |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception |