Thread: Acl/Auth
View Single Post
  #4 (permalink)  
Old 03-12-2008, 02:46 PM
xentek's Avatar
xentek xentek is offline
Senior Member
 
Join Date: Feb 2008
Posts: 112
Default

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 View Post
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.
__________________
- xentek
Reply With Quote