Override WordPress user with Oauth2 account

If you can stick to overriding just functions that are located in wp-includes/pluggable.php then you should be able to avoid any kind of plugin conflicts … unless you are using plugins that are overriding the same pluggable functions.

Just make sure that your functions are declared before pluggables is loaded. Plugins are loaded before the pluggables file … so if you define your function overrides in a plugin then you can be certain they are loaded. Otherwise just make sure to use an earlier action to do so.

There are quite a few authentication, cookie, and user related functions in there for use.

Leave a Comment