Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @skrabbel, thanks for chiming in. Would you like to share more on how the code creates a security risk?

    On using the same email address for wordpress and facebook, it’s kind of hard to force users to do exactly that, especially when they have multiple email accounts. So I won’t really think that’s an optimum solution.

    The solution I had requires coding. It was to hook into WSL’s wsl_process_login_create_wp_user_start action, then attempt to authenticate the user manually ($user = wp_authenticate( $username, $password );) using the username ($_REQUEST["user_login"]) and password ($_REQUEST["user_password"]). Then return the user’s id ($user->ID) for WSL to process and link to the profile.

    This solves the problem of WSL trying to create a new user in its wsl_process_login_create_wp_user() function, resulting in a conflict if the username is already used (i.e. Facebook’s profile’s user details conflict with WordPress’s).

    Sharing how I solved this for future readers’ benefits. TDLR I debugged by having:
    define(‘WP_DEBUG’, true);
    in wp-config.php

    When the restoration hangs on “Restoring database…”, I waited for a while (~2min was sufficient for me most of the time) and loaded up the site (for me it was https://localhost/wp). I then get some error screen (500 internal server error in my case).

    Turning on debug in wp-config.php showed me the php errors, which I found to be a plugin I’m using using the php shorthand <? instead of <?php, and closing the file at the end with ?>. Editing <? to <?php and removing the ?> at end of file resulted in the site working again.

    Your source of error may vary and it’ll help if someone who is familiar with php and has technical background can help you.

    This plugin works as intended, all files and data are copied. Also my go to plugin for duplication / migration of site.

    Google account linking is fine when I tested it. Might be because the existing WordPress account email is the same as the Google email but different from the Facebook email.

    Twitter linking to existing account worked fine. I’m guessing it’s because the Twitter api doesn’t give the user’s email, and that Social Media Login plugin uses the email to identify the user (but not the username?).

    Faced the same scenario.

    After successfully authenticating with with Facebook, it displays 2 options to link existing account or to create new account.

    Selecting link existing account leads to page to verify username and password. But after entering such details, the following message was shown:

    An error occurred while creating a new user: Sorry, that username already exists!

Viewing 5 replies - 1 through 5 (of 5 total)