3 thoughts on “WordPress Custom Login with Basic Authentication

  1. @franckm

    Modify _authenticate_wp()

    after this call:

    $user = wp_authenticate($username, $password);

    $user will have all the WP user information, var_dump($user) to take a look at how it’s arranged.

    Then you can modify the return values and return $user if authentication is successful, or false (or something similar).

    With the returned $user you can continue on with your custom implementation.

    Note: this example is only for very custom integration scenarios, for most use cases, there are more WP-specific ways that are more appropriate.

  2. This has been ever so useful. Now I can finally authenticate utilizing the wordpress users to my web app from within the desktop client.

    I was hoping a simple SQL query could do it, but your site helped me figure everything out and piece it together. Thanks a lot for this code!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s