Php – Best way to embed Login Form in Zend Framework pages

compositionPHPzend-framework

What is the best way to embed Login Form into several pages in Zend Framework?

Currently I have two controllers, LoginController for separate login form
and IndexController for actions on index page.

I need to include Login Form into index page to let users log in both from the front page and from Login page.

My current solution is to make IndexController extend LoginController, but I have to make some adjustments to the code of both controllers (e.g. call parent::IndexAction from inside child indexAction to render login form and various redirects should be updated too).

Is it OK implement "multi-page" login with such a controller inharitance?

What is the best practice?

Related Topic