Tuesday, 3 September 2013

Wrong username given to my template when modifing the username [on hold]

Wrong username given to my template when modifing the username [on hold]

I'm working on a form that enabled the user to change his username.
However, I want the user to enter his current password in order to change
the username.
The modification works well and when the current password is wrong, it
gives an error. However, the username of the user given to the template is
the wrong one and so my text saying "Logged as XXX" in the header bar is
wrong.
I mean that if the user enters "YYY" for the username, and the current
username is "XXX", the message in the header bar will be "Logged as YYY"
instead of "Logged as XXX".
I'm using app.user.username to display the name in my TWIG template.
Any idea?
Thanks by advance, Valentin

No comments:

Post a Comment