Well the auth method doesn't have to be static, but it might be convenient if you want to call it from other Model/Controllers without creating an instance of the user object to call it.
so if you have a User model, put a method in it that calls Zend_Auth:
PHP Code:
function loginUser($username,$password)
{
// call zend_auth and pass it your user/pass values
}
In your UserController, create an action method for the form to post to:
PHP Code:
function processLoginAction()
{
// call your loginUser method, and pass it the username and password submitted by the form.
}
Hope that helps. I think you've got it though
Quote:
Originally Posted by Alix
I also want to use Zend_Acl, becouse i wil have a diferent kind of users with difrent privleges, like admin , memeber , quest.
But how do i connect this two components with each other?
|
Haven't gotten that far yet myself, but will be implementing soon. I'll try to report back with my findings.