Themed Login Plugin

Latest Version 1.1

Works with WordPress 2.0+

Make certain you read the upgrade procedure below if you are upgrading from a previous version.

I created this plugin because I didn’t like the fact that I was unable to customize the login, registration, and reset password forms. It seemed like such an oversight to not allow for this functionality in the core code. I also detest the idea of modifying the core code.

Features at a Glance

  • Theme the Login, Registration, and Forgot Password Forms.
  • Customize the top text of the forms
  • Change the default registration email that goes to the user. NEW
  • Change the default notification email that goes to the admin. NEW
  • Change the default email address (wordpress@domain.com that the registration email comes from. NEW
  • Send emails to a user when the administrator adds a user.  This is an option that can be turned on or off.  If this option is on, when an administrator adds a user then that user gets an email just as if the user had registered manually except that the administrator specifies the password. NEW

Style Note:

If you want to center the login form you can add
#login {margin:0 auto 0 auto;width:250px;}
to your theme’s style.css file.

If you want to display the list items like I have (instead of with bullets) add the following lines as well:
#login ul {margin:0;padding:0;}
#login ul li {display:inline;margin-left:10px;}

This plugin will allow you to incorporate the various forms mentioned above into your current theme. It’s likely that for many installations it should be as simple as downloading it, installing it, and activating it. However, it’s probably just as likely that some themes will take a little customization.

With that in mind, I created an options form which will allow you to customize elements before and after the form. The ease of incorporating this functionality will depend on the complexity of your current theme.

I’ve created a little sandbox blog that will allow you to play with the plugin a little bit. The login is testadmin and the password is the same. Just log in with the user name and password, click on Plugins=>Login Register Options to see the options made available. You can see the end result when you click on the Login link both in at sandbox.jameskelly.org and my site.

The new features will allow you to alter the registration email that goes to the user completely. You can insert the dynamic information (like the user name and password) anywhere you want to using the instructions in the option form.

You can also change the subject of the email and the email address that the registration email comes from. Normally, the email address new registrations get (the reply to address) is from wordpress@domain.com, which isn’t very friendly. It also requires you to set up a new address (wordpress) just in case someone tried to contact you using that address.

I also created the ability to change the new registration email notification that you receive. I doubt many will do that, and I haven’t…but if you feel the need go ahead.

Make certain you TEST the registration process once you’ve completed making the changes to the email by registering a temporary account using an email address that isn’t currently in your list of users. This will allow you to see the new email that is being sent to your users. Remember to check the from address, subject line, and email contents so that you know what any new registrations will be getting.

Installation is easy:

  1. Download the Themed Login Registration plugin.
  2. Upload it to your /wp-content/plugins directory.
  3. Activate the plugin
  4. Customize the options in the menu item created (Login Register Options) under the Plugins main menu.

Upgrading is just as easy

  1. Download the Themed Login Registration plugin.
  2. Upload it to your /wp-content/plugins directory replacing the old plugin.
  3. Deactivate the plugin.
  4. Activate the plugin.
  5. Customize the options in the menu item created (Login Register Options) under the Plugins main menu.

The very top option is an option that I’ve not seen on many plugins which should (in my opinion) exist. It toggles the ability to totally remove all options relative to the plugin that have been created by the plugin. I intend to incorporate this type of functionality into all my plugins.

Keep in mind that this plugin overrides the wp-login.php and the wp-register.php files. The code contained in the plugin is (pretty much) a direct copy of those two pages and I changed very little of the “stock” code except where it was absolutely necessary.

I attempted to comment all the code changes that I made to the “stock” code although in my haste, I likely missed some.

IMPORTANT: I will make every attempt to incorporate any and all modifications made to the wp-login.php and the wp-register.php files (should any occur) in the main trunk of WordPress releases. However, with that in mind, you need to be aware that this plugin completely overrides the wp-login.php and wp-register.php files and it is your responsibility to insure that these files and the code in this plugin is kept up-to-date of any security releases made available by the WordPress open source project.

Change Log

10/22/06 - Added a checkbox to the login registration options as well as functionality that will email users the custom email (also specified in the login options) whenever an administrator creates an account. This option defaults to “off”. This feature was requested by Annelies from Helikon Symfonieorkest Eindhoven (Helikon symphony orchestra), thanks Annelies.

09/18/06 - Fixed a bug which caused errors on versions of WordPress 2.0.1
-Added the ability to change the default WordPress registration email, admin notification email, and the from address (wordpress@domain.com) for the user registration email. A special thanks to Eliyahu from http://tsiyon.org/podcast for the idea to change the default email

09/10/06 - When the reset password form was submitted the error page didn’t load the rest of the theme. Now it loads the complete themed page including the sidbar. Thanks to http://www.war59312.com/ for the request.

09/09/06 - First bug found and corrected thanks to http://learninform.com. The bug revolved around $wp_query->query_vars not existing as an array.

09/09/06 - First version (0.9) went live