Mobile app version of vmapp.org
Login or Join
Shanna517

: WordPress login broken when using WooCommerce and Theme My Login I am running WordPress with WooCommerce and Theme My Login plugins. When a user registers on my site it sends them a confirmation

@Shanna517

Posted in: #Wordpress

I am running WordPress with WooCommerce and Theme My Login plugins. When a user registers on my site it sends them a confirmation email and then they can click to activate account. Problem is when the user goes to login they get an error of incorrect password.
If the user uses the forgot password link and resets the password then they can login without any errors. What might cause this problem? Is the password being encrypted with the wrong method?

I went through the registration process and checked the string in the php users table.

Password in php table after registration:

$P$BF/gIt6dFfBBuNx6rP41Qv3i71TUie1


Password in php table after change password to same password:

$P$BxpByDbNU3vr3sytTOcbzttp1tOodH1


Do Theme My Login and either WooCommerce or WordPress use different encryption methods?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shanna517

2 Comments

Sorted by latest first Latest Oldest Best

 

@Barnes591

Have you updated the plugin? At one point this was a bug in TML that got resolved.

Theme My Login handles user registration in class-theme-my-login.php > register_new_user on line 975, which contains logic for generating the registered user's password.

Woocommerce handles user ("customer") registration in wc-user-functions.php > wc_create_new_customer on line 44, which contains logic for generating the registered user's password.

I'm not entirely sure if both plugins are trying to handle user registration at the same time (it could depend on the settings you have enabled), but there could very well be a conflict here. A good test might be to disable Theme My Login and see if the problem goes away.

10% popularity Vote Up Vote Down


 

@Martha676

I found a solution that worked for me:

In the file theme-my-login/includes/class-theme-my-login.php the function register_new_user($user_login, $user_email) always assigns a random password.
Then,
1. to search the following lines:
$user_login = $_POST['user_login'];
$user_email = $_POST['user_email'];
and add the following line to get the password which the user put:
$user_pass = $_POST['pass1'];
$this->errors = self::register_new_user( $user_login, $user_email, $user_pass );


in the last function you add the parameter $user_pass:
public static function register_new_user( $user_login, $user_email, $user_pass ) {
and finally, you comment:
//$user_pass = apply_filters( 'tml_user_registration_pass', wp_generate_password( 12, false ) );


This applies only if the user enters his password in the registry.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme