1. jayrigby
  2. Support
  3. Thursday, October 16 2014, 03:28 PM
I am using the username o email login option which works great.

However, for users reseting their passwords it would be great if the accepted email or username along with the verification code.

Is there a way to do this?? Happy to customise my files with an override.

Thanks for your support

Best wishes,
Jay
Accepted Answer
admin Accepted Answer
Admin
Hi,
to do this you must hack our system plugin at file /plugins/system/jsn_system/jsn_system.php
at line 27 add this code
if(JRequest::getVar('task')=='reset.confirm')
{
$input = JFactory::getApplication()->input;
$form=$input->post->get('jform', array(), 'array');
if(isset($form['username'])){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('a.username')->from('#__users as a')->where('email = '.$db->quote($form['username']));
$db->setQuery( $query );
if($username=$db->loadResult()){
$form['username']=$username;
$input->post->set('jform', $form);
JRequest::setVar('jform', $form);
}
}
}


NOTE: this code is not tested and not supported
  1. more than a month ago
  2. Support
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.