"Remember me" and email address


My realm users’s username are UUID strings. My users have to login with email (a JavaScript validator is done on the login page), but when they use the “remember me” check-box, when they disconnect and try to reconnect, the UUID is filled in the login form instead of the email address.

Is it possible to fill the login form with the email address instead of username when using the “remember me” check-box ?

I tried to change the theme (login.ftl) for using the email instead of username but it doesn’t work, I’m getting an empty username field.

<input tabindex="1" id="username" class="${properties.kcInputClass!}" name="username" value="${(login.email!'')}" type="email" disabled />

Is there a way to make this work ?

Thanks a lot !