LM-Commons / LmcUser

A generic user registration and authentication module for Laminas. Supports Laminas\Db and Doctrine2. (Formerly ZfcUser)
BSD 3-Clause "New" or "Revised" License
15 stars 16 forks source link

Allow the ability to manually set the partial used by the login widget #62

Closed visto9259 closed 3 months ago

visto9259 commented 5 months ago

The lmcLoginWidget() use the partial _form.phtm to render the login form. This is the same partial used by the default login.phtml view. When used in the context of a navigation bar, the login form may be different than a login form used in a regular view.

Therefore, the ability to manually set the partial used by the widget would allow to render the login form separately from the login view.

Add an optional parameter to the lmcLoginWideget() helper to set the template used by login widget. If the optional parameter is not passed, then default to _form.phtml (current behavior)

visto9259 commented 3 months ago

I got this wrong.

The login widget creates a View with the template set by the user_login_widget_view_template config key, which defaults to lmc-user/user/login.phtml.

Therefore there is no need to override the partial as the entire template can be overriden.

No need to fix.