Login With Email/username Modification In 4.3.x

Hello all,

How i enable the login or sign in with email/username in version 4.3.3. In this version sign in with email is enable but how to enable both username or email....

In which functions or page i have to modify to do this??

Please help me out from this problem... any help would be appreciated

Thanks

Don't think username is available anymore. May need custom work.

Hello all,

How i enable the login or sign in with email/username in version 4.3.3. In this version sign in with email is enable but how to enable both username or email....

In which functions or page i have to modify to do this??

Please help me out from this problem... any help would be appreciated

Thanks

Unfortunately, the usernames are not supported since 4.3.1

Would require code modification to accept and code modification to allow a user to create a username. The fields are still in the DB but are not used.

Yes i know that username is not used from cs cart version 4.3.x... but i have to enable just login o with username or email...so, in which function or page i have to modify??

Please suggest some points

app/functions/fn.users.php

Find the fn_auth_routines function and replace:

$user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);

with

$user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);
if (empty($user_data)) {
    $user_data = db_get_row("SELECT * FROM ?:users WHERE user_login = ?s" . $condition, $user_login);
}

(!) Not tested

Thanks for your reply..its works like a champ...thanks

You are welcome!

app/functions/fn.users.php

Find the fn_auth_routines function and replace:

$user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);

with

$user_data = db_get_row("SELECT * FROM ?:users WHERE $field = ?s" . $condition, $user_login);
if (empty($user_data)) {
    $user_data = db_get_row("SELECT * FROM ?:users WHERE user_login = ?s" . $condition, $user_login);
}

(!) Not tested

Hi eComLabs

I have tried to do that change but is not working for me... it still ask me for mail address as a required field, I´m using cs-cart version 4.3.6, do you know if that mod is suitable for my version??

Thanks in advance

Hi eComLabs

I have tried to do that change but is not working for me... it still ask me for mail address as a required field, I´m using cs-cart version 4.3.6, do you know if that mod is suitable for my version??

Thanks in advance

Do you mean form? You should remove the cm-email class from the input on the authorization form

Do you mean form? You should remove the cm-email class from the input on the authorization form

Thank you very much eComLabs ... tou were right:

design/themes/(theme name)/templates/views/auth/

open loginform.tpl

and erase cm-email and change language variable {__("email")} as desired...

Then change what you have pointed up here eComLabs...

Now I have a doubt .... how users can retrieve their username if they have forgotten it? Did you any of you have had this problem?

Thank you very much eComLabs ... tou were right:

design/themes/(theme name)/templates/views/auth/

open loginform.tpl

and erase cm-email and change language variable {__("email")} as desired...

Then change what you have pointed up here eComLabs...

Now I have a doubt .... how users can retrieve their username if they have forgotten it? Did you any of you have had this problem?

Since this feature is not supported anymore, there is not way to retrieve it without additional code modificaitons