WP-Members is a fantastic plugin for securing various areas of your WordPress site for access by registered users.  While extremely versatile, not everything can be controlled through the settings alone.

An often-requested feature is for the plugin to automatically login a user after they have registered.  Unfortunately, this functionality is unavailable in the current version of the plugin.  However, by adding an action to WP-Members’ wpmem_post_register_data tag, it becomes possible to add this extra functionality.  The following can be added to your plugin file, or even to your theme’s functions.php file:

 

Note: At the time of writing, the current production version of WP-Members is 2.8.2

Written by Danny