Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

How to embed the login form on another page

Eric Richer edited this page Jul 10, 2020 · 1 revision

Task

Embed the login form on another page (ie: homepage login widget)

Solution

LmcUser provides a View Helper (lmcUserLoginWidget) which you can use from any view script in your application. Just add the following call to the location in your markup where you want the form to be rendered:

<?php echo $this->lmcUserLoginWidget(); ?>

Note

The view helper can also return the login form:

<?php $form = $this->lmcUserLoginWidget(array('render' => false)); ?>

This will return an object of type Login that can be used to generate a custom login form.