I’m sending users an email. In this email they must click a link that brings them to the login page of my site:
http://www.testsite/login
I’d like the username(Email address) to be prepopulated for them.
I was thinking of simply adjusting the link sent to them to include it like so:
http://www.testsite/login?email=tester@test.com
I can then use some javascript to pull this info and place it in the form field.
I’d like people thought’s on this approach.
Is it safe? Is there a better or easier way to achieve it? Is there any problems with this approach?
My app uses grails 1.3.7 by the way.
Thanks
Though it would probably be better to pre-populate it on the server side, here is a modification of another answer on Stack Overflow:
Then, use that the result of that function to populate the textbox:
Hope this helps.