Object Cache issues with user picked password
-
Hello,
we use [wppb-register] on a multisite. We allow users to specify their own password for the signup.
However the password never works.
I figured out you update the password for the user using the database call in functions wppb_manual_activate_signup() and wppb_activate_signup():
$wpdb->update( $wpdb->users, array('user_pass' => $meta['user_pass'] ), array('ID' => $user_id) );
You have no other option as you are storing that password in wp_signups in it’s secure form.
However to make this work for high-performance sites with object caching (we use APC) it’s also necessary to flush the user object cache data. Here’s a quick fix I created:
add_action( 'wppb_activate_user', 'fv_tweak_wppb_activate_user' ); function fv_tweak_wppb_activate_user( $user_id ) { wp_cache_delete( $user_id, 'users' ); }
Please review this fix and include it in both free and Pro version of your plugin. If there is a Github repository, we can put our fixes there.
Thanks!
- The topic ‘Object Cache issues with user picked password’ is closed to new replies.