You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to customize register or login form labels, you can inject in twig function {{ login_form() }} an array to define Username or Password labels.
Here is a way to do it beacause of a bug in src/Twig/LoginFormExtension.php:
As Bob suggested, having the login and register forms build with Symfony Form would be easier and more simple to customize. For instance, having a id in the
tag or having a defined value in the username would be cool add-ons.
Thanks for your job and this nice extension !
The text was updated successfully, but these errors were encountered:
oportier
added a commit
to oportier/users
that referenced
this issue
Mar 4, 2021
Hi,
If you want to customize register or login form labels, you can inject in twig function
{{ login_form() }}
an array to define Username or Password labels.Here is a way to do it beacause of a bug in
src/Twig/LoginFormExtension.php
:Why this ugly definition in formParms array with keys 0 and 1 set with respective values username and password ?
In
src/Twig/LoginFormExtension.php
and pricisely getUsernameField() and getPasswordField(), in_array() is not the correct way to check if username or password are set.https://github.com/bolt/users/blob/master/src/Twig/LoginFormExtension.php#L67
The right way should be this one:
As Bob suggested, having the login and register forms build with Symfony Form would be easier and more simple to customize. For instance, having a id in the
tag or having a defined value in the username would be cool add-ons.Thanks for your job and this nice extension !
The text was updated successfully, but these errors were encountered: