We needed to configure WordPress to work with an external authentication system, provide automatic log in for the user and create a new user in WordPress if none exists. The user’s details are available to WordPress in environment variables.
To do this, we use three plugins:
- Angsuman’s Authenticated WordPress Plugin[1], which forces users to the login page if they’re not logged in,
- Daniel Westermann-Clark’s HTTP Authentication WordPress Plugin[2], which automatically logs people in if the REMOTE_USER environment variable is set and creates the user if they don’t exist,
- Ben Balbo's Environment Profile WordPress Plugin, which forces a user's profile to match values stored in environment variables.
Firstly, I’d like to thank Daniel for accepting (with changes) my patch to facilitate the creation of non-existent users, an option that can be disabled if you don’t want this feature.
The first two plugins solved nearly all of my issues, with the exception of using environment variables to fill in the user data on user creation, and in true open source fashion, these three distinct plugins now do a job particularly well, and can be used in conjunction with or separately from each other.
Source
Browse Trunk
Checkout command: svn co http://zaltana.org/project/zaltana/Wordpress-Plugin-EnvironmentProfile/trunk Wordpress-Plugin-EnvironmentProfile
You may also download this plugin code directly from http://zaltana.org/project/zaltana/Wordpress-Plugin-EnvironmentProfile/trunk/environment-profile.php.
