Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact
You are here: Home

yan.kun0567

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 8, 2019 at 6:52 pm in reply to: Users can't change Password on Profile page #18551
    yan.kun0567
    Participant

    Okay, the github one seems outdated… I’m out.

    July 8, 2019 at 6:42 pm in reply to: Users can't change Password on Profile page #18550
    yan.kun0567
    Participant

    Okay, so I investigated the code, and this is, in my opinion an an least very interesting bug? Why did nobody recognised this before?

    On checking if the user has entered a new password (class.swpm-front-registration.php:274), you call wp_logout() BEFORE calling the update statement on the database. But wp_logout() cancels the execution of any following code as it seems.

    `if (isset($member_info[‘plain_password’])) {
    //Password was also changed so show the appropriate message
    $msg_str = ‘<div class=”swpm-profile-update-success”>’ . SwpmUtils::_(‘Profile updated successfully. You will need to re-login since you changed your password.’) . ‘</div>’;
    $message = array(‘succeeded’ => true, ‘message’ => $msg_str);
    unset($member_info[‘plain_password’]);
    wp_logout(); //Log the user out from the WP user session also.
    SwpmLog::log_simple_debug(“Member has updated the password from profile edit page. Logging the user out so he can re-login using the new password.”, true);
    }

    $wpdb->update($wpdb->prefix . “swpm_members_tbl”, $member_info, array(‘member_id’ => $auth->get(‘member_id’)));
    $auth->reload_user_data();
    }

    I can verify this, because any other input is lost too, if a new password is entered.

    I’ve moved the call to logout to the end of the function by storing a bool value inside the if statement, if logout should be called, and now everything is working as expected. Now heading to github to create a merge request.

    July 8, 2019 at 6:04 pm in reply to: Users can't change Password on Profile page #18549
    yan.kun0567
    Participant

    I’ve also checked, that the correct values are posted, and yes, everything is included in the post-body.

    April 26, 2019 at 4:42 pm in reply to: Passwords are stored in cleartext #18014
    yan.kun0567
    Participant

    Nope, referring to the table in the database. I’ve updated the plugin now to the newest version (previously installed was 3.4.x).

    Interestingly, all users now have to reset their passwords, because the pw’s stored in cleartext aren’t supported by phpass.

    After resetting the password, the new one is beeing hashed and looks like a proper wordpress/phpass entry.

    Thanks for the support!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Next Page »

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy