User Documentation

User:Forgot_Username template tag

The User:Forgot_Username function allows your users to retrieve their forgotten username to your site by entering in their email address on file.

{exp:user:forgot_username} content {/exp:user:forgot_username}

NOTE: In order to use this feature, you must have a data in the Forgot Username Notification Template template inside Preferences page of User control panel. An example notification template might look something like:

Hi {screen_name},

Per your request, this email contains your username for {site_name} located at {site_url}.

Username: {username}


The following parameters are available for use:



This parameter allows you to bypass the EE message template for displaying errors, and instead show your own regular template with the error messages. Error template must follow guidelines of User Error Page.



This parameter allows you to control any form attribute for the form in your template. Simply replace attribute with an attribute name such as id, name, class, etc, and specify a value for that attribute. You can specify this parameter multiple times to control as many attributes as necessary. This would normally be done to control your form with Javascript or style it with CSS.



This parameter allows you to execute Javascript functions at form submission.



This parameter allows you to bypass the default EE message template page and brings the user directly to the template URI specified.



This parameter allows you specify a return URL you'd like the user to be returned to after submitting the form.



This parameter allows you to set the action on the form to have https://. Use for processing forms with SSL.



This parameter allows you to set the return on the form to have https://. Use for processing forms with SSL.

Form Fields

The following form fields are available for use:


<input type="text" name="email" id="email" />

This field is the field in which the user would specify their email address to retrieve their username, and is a required field.


The following is a complete example of what a Forgot Username form might look like:

<h2>Forgot Username?</h2>
    If you've forgotten your username, just enter your email address you registered with and you will receive an email informing you of your username.

    <label for="email">Email Address <span class="required">*</span></label>
    <input type="text" name="email" id="email" />
    <button type="submit">Submit</button>


Having problems setting up and/or using User? Support is offered from 10am to 4pm EST weekdays. Send us an email at and we will respond as quickly as we can.