I have this function iside one of my controllers;
public function getAuthAdapter(array $params)
{
$authAdapter = new Zend_Auth_Adapter_DBTable(
$db,
'USERS',
'USERNAME',
'PASSWORD'
);
// Set the input credential values (e.g., from a login form)
$authAdapter->setIdentity($params['username'])
->setCredential($params['password']);
return $authAdapter;
}
I assume I need to make $db refer to my database adapter? But I am unsure of how I do that.
My database connection is defined in my application.ini file, and I am using the autoloader (but I don’t really understand the inner workings of it all).
Sorry if this is not clear.
Steve
Registered in England & Wales under Registered Number 3872673. Registered
Office Address - Bryggen Road, North Lynn, Industrial Estate, Kings Lynn, Norfolk, PE30 2HZ
Williams Refrigeration reserves the right to block any email attachment we deem inappropriate and to also reject any inbound connections from Blacklisted servers. Any email meeting the above criteria will be automatically rejected without notification given to the original sender.
NOTE: In accordance with the Data Protection Act compliance, all Bulk sends should use the BCC field as much as possible.
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error or are having trouble sending email to Williams please notify the system administrator - postmaster@williams-refrigeration.co.uk
Any views or opinions expressed in this e-mail are those of the sender and do not necessarily coincide with those of Williams Refrigeration or the AFE Group.
没有评论:
发表评论