Joomla Token Error when confirming a password reset
How can I tell if I need to make this change?
On your Joomla! installation, see if you have a file a templates/current-template-name/html/com_user/reset/confirm.php file.
Note: substitute the actual name of your template for current-template-name.
If the confirm.php file exists at that location, then you need to make certain the new username field has been added. If you do not have this file, then this issue does not relate to you.
What specifically must be added to the file?
All Template Overrides can be different, so this is an example of how you would apply this fix using RocketTheme's Gantry Layouts. If you created your own layouts or used layouts from someone else, your changes may be slightly different.
A label and field for username must be added to the form, as pictured below:
<div>
<label for="username" class="hasTip" title="::"><?php echo JText::_('User Name'); ?>:</label>
<input id="username" name="username" type="text" class="required" size="36" />
</div>
Where should that be placed within the file?
style="font-family: arial, helvetica, sans-serif;">In this specific layout, the new label and field is placed below the "Confirm your Account" literal and above the existing token field.
<div class="user"> <h1 class="pagetitle"> <?php echo JText::_('Confirm your Account'); ?> </h1> <p> <?php echo JText::_('RESET_PASSWORD_CONFIRM_DESCRIPTION'); ?> </p> <form action="" method="post" class="josForm form-validate"> <fieldset> <legend><?php echo JText::_('Confirm your Account'); ?></legend> <div> <label for="username" class="hasTip" title="::"><?php echo JText::_('User Name'); ?>:</label> <input id="username" name="username" type="text" class="required" size="36" /> </div> <div> <label for="token" class="hasTip" title="::"><?php echo JText::_('Token'); ?>:</label> <input id="token" name="token" type="text" class="required" size="36" /> </div> <div class="readon"> <button type="submit" class="button"><?php echo JText::_('Submit'); ?></button> </div> </fieldset> <?php echo JHTML::_( 'form.token' ); ?> </form> </div>
;) Have Fun