Home › Forums › WoodMart support forum › Disable username login and force email login
Disable username login and force email login
- This topic has 5 replies, 2 voices, and was last updated 9 months, 3 weeks ago by
luka.soldo007.
-
AuthorPosts
-
June 29, 2024 at 3:24 am #576338
luka.soldo007ParticipantIs there anyway to disable username login and only allow login with entering email?
because of security..i have forum and username-as are visible and hacker can easier hack account or guess password by using their usernameis there way to allow login only by entering email + password (disable login by username)
i know this is not change-able via theme because its woocommerce login but if you knonw way how to do it or at least any help in which way i should look to do it..i would appreciaite it very much
i treid googling but i found nothing…neither one plugin does it
June 29, 2024 at 3:40 am #576339
luka.soldo007Participantand how to add GDPR privacy policy checkbox when user comment on Woodmart Blog
for following GDPR before posting there should be checkbox that is required to markJuly 1, 2024 at 11:21 am #576648
Hung PhamKeymasterHi luka.soldo007,
Thanks for reaching to us.
First of all, I’m really sorry have taken long time to reply you due to the weekend.
1. Registration and Login are default WooCommerce functionalities and WoodMart does not control it. For specialized assistance and potential solutions, I kindly suggest that you reach out directly to the WooCommerce plugin’s support team https://wordpress.org/support/plugin/woocommerce/, who are better equipped to provide you with the guidance you requires.
2. Unfortunately, there is no such an option right now. You need to find a third party plugin to achieve more functionality that best suits you.
Regards,
July 17, 2024 at 9:27 am #583839
luka.soldo007Participant1. i figure out how to set checkbox GDPR checkbox..
2. i also resolve how to force email login, here is snipped code so you can help others when they ask
there is also ability to allow certain user to continue login with username if you add their username on list// Function to authenticate using email only with exceptions function custom_email_login_authenticate($user, $username, $password) { // Check if the username is in the exception list $allowed_usernames = array( 'testuser', // Add usernames you want to allow to log in using username 'specialuser', // Add more usernames as needed ); if (in_array($username, $allowed_usernames)) { return wp_authenticate_username_password(null, $username, $password); // Allow login with username } // If the username is not in the exception list, enforce email login if (!is_email($username)) { return new WP_Error('invalid_email', __('Please login using email not username')); } // Get user by email $user = get_user_by('email', $username); if ($user) { $username = $user->user_login; } // Continue with the standard authentication process return wp_authenticate_username_password(null, $username, $password); } add_filter('authenticate', 'custom_email_login_authenticate', 20, 3);
Please check my other Topic i have issue with theme that i can’t resolve, thanks <3
-
This reply was modified 9 months, 3 weeks ago by
luka.soldo007.
-
This reply was modified 9 months, 3 weeks ago by
luka.soldo007.
July 17, 2024 at 10:33 am #583874
Hung PhamKeymasterHi luka.soldo007,
Thanks for reaching to us.
Glad to hear your issue has been resolved and thanks for sharing solutions. Keep us in mind for future questions and concerns, we’re always here to help!
Regards,
July 17, 2024 at 12:18 pm #583930
luka.soldo007ParticipantThank you very much..you can close this thread
please check this one
https://xtemos.com/forums/topic/woodmart-big-issue-cant-post-reviews-commennts/#post-583929 -
This reply was modified 9 months, 3 weeks ago by
-
AuthorPosts
The topic ‘Disable username login and force email login’ is closed to new replies.
- You must be logged in to create new topics. Login / Register