By Altitudes on Friday, 24 June 2016
Posted in Technical Issues
Replies 7
Likes 0
Views 785
Votes 0
Hello

ES allows users to login using their email address or their username equally. This is a very good thing, and the consequence is that many users forget their username (as most websites use email address for login now).

Everything is fine until these users forget their password... Because in the "I forgot my password" procedure, username is needed (see attached screenshot).
At this step of the procedure, why can't the user use his username or email address equally? It would avoid so many users fail resetting their password...
Hey Altitudes,

We actually did thought about this and the only way for it to allow you to use e-mails to reset the password is when the option "Use Email as Username" is enabled, http://take.ms/SFkK0

When that option is activated, the confirm reset password looks like this, http://take.ms/piiX9
·
Saturday, 25 June 2016 03:02
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, but this is not a good option for me (in particular because usernames appear in Kunena forum ).

Would it be possible to allow users to use their username or email address equally in the reset password form, at least when the option "Allow login with e-mail" is set to Yes?
·
Sunday, 26 June 2016 05:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

if you would like to achieve this, you have to modify on this file -> JoomlaFolder\administrator\components\com_easysocial\models\users.php

// LINE 2442
if (FD::config()->get('registrations.emailasusername')) {
$sql->where( 'email' , $username );
} else {
$sql->where( 'username' , $username );
}

// Replace with
$sql->where( 'email' , $username, '=', 'OR');
$sql->where( 'username' , $username, '=', 'OR' );
·
Tuesday, 28 June 2016 15:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello

Sorry for the delay of my reply.

What's about:

if (FD::config()->get('registrations.emailasusername')) {
$sql->where( 'email' , $username );
} elseif (FD::config()->get('general.site.loginemail')) {
$sql->where( 'email' , $username, '=', 'OR');
$sql->where( 'username' , $username, '=', 'OR' );
} else {
$sql->where( 'username' , $username );
}

This could be included in ES standard code, no? Check my code through, as I am not a developer
·
Thursday, 18 August 2016 17:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I will suggest to use this is because what if both option also enabled from backend.

if (FD::config()->get('registrations.emailasusername') && FD::config()->get('general.site.loginemail')) {
$sql->where( 'email' , $username );
} elseif (FD::config()->get('general.site.loginemail')) {
$sql->where( 'email' , $username, '=', 'OR');
$sql->where( 'username' , $username, '=', 'OR' );
} else {
$sql->where( 'username' , $username );
}


And download my attached file then replace into this file location : JoomlaFolder\components\com_easysocial\themes\wireframe\profile\reset.password.php and see how it goes.
·
Monday, 22 August 2016 11:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you, I tested this and it is working good

So this will be included in next ES version? Don't miss that you have some strings that need to be translated in the reset.password.php you provided
·
Wednesday, 24 August 2016 03:02
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome and reminded

I will included above fix in the next release version.
·
Wednesday, 24 August 2016 12:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post