# Populating both email and username from URL parameters?

**URL:** https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890
**Category:** Support
**Created:** [May 13, 2026, 4:34pm UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890 "2026-05-13T16:34:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [May 13, 2026, 4:34pm UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890/1 "2026-05-13T16:34:25Z")

</div>

There’s a way to prepopulate the email address by linking to `forum.example.com/signup?email=alice@example.com`.

Is there a parameter to also pre-populate the username field? I want to prepopulate it with a random username to reduce sign-up friction. Users will still be able to change it before submitting if they want.

If there isn’t a built-in way, I’ll write a plugin.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 13, 2026, 4:43pm UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890/2 "2026-05-13T16:43:40Z")

</div>

there is an existing topic

> [@Populating email field on login page](https://meta.discourse.org/t/populating-email-field-on-login-page/357616):
>
> Hello, How can I send a login link to my users and make sure the email field is already populated ? Something like [www.my-discourse-site.com/login?email=person@gmail.com](http://www.my-discourse-site.com/login?email=person@gmail.com) So that this user gets his email ([person@gmail.com](mailto:person@gmail.com)) already filled in the login page when they click Thanks

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [May 13, 2026, 5:55pm UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890/3 "2026-05-13T17:55:29Z")

</div>

Thanks, I don’t think that other topic is correct, because the feature exists for emails.

If you open this URL in an incognito window, it will fill the email but not the username:

- [https://meta.discourse.org/signup?email=user@example.com&username=nova\_tsunami\_fox\_1234](https://meta.discourse.org/signup?email=user@example.com&username=nova_tsunami_fox_1234)

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 13, 2026, 9:39pm UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890/4 "2026-05-13T21:39:50Z")

</div>

> [@Lilly](#):
>
> there is an existing topic

That’s about the _login_ page. The `email=` parameter does work on the _signup_ page.

---

<div class="post-metadata">

### Author: ![ted](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ted/32/283882_2.png) [@ted](https://meta.discourse.org/u/ted)
#### Post date: [May 18, 2026, 1:32am UTC](https://meta.discourse.org/t/populating-both-email-and-username-from-url-parameters/402890/5 "2026-05-18T01:32:16Z")

</div>

I checked. There isn’t any built-in way to do this right now. If you want to give it a try, the relevant flow for the e-mail is this:

[Rails controller sets cookie](https://github.com/discourse/discourse/blob/main/app/controllers/static_controller.rb#L131-L133)  
 → [Ember router reads cookie and passes value to Ember controller](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/routes/signup.js#L96-L98)  
 → [Ember component accesses value on Ember controller](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/templates/signup.gjs#L75)

Could also be worth checking with the team if they’d accept a PR for this, before making it a plugin.
