How We Improved Logins and Registrations in Charitable

One of the key focuses of Charitable development lately has been the front-end user login and registration process. Version 1.4.0 introduced a password reset process. Today we’re releasing version 1.4.2, which includes several enhancements to the login and registration forms.

Note: If you are already using the Charitable shortcodes for login and registration, there are some changes you need to be aware of. Read on to find out how you might be impacted.

The Problem

When a visitor to your site tries to access a part of Charitable that they need to be logged in for, such as the profile editor or the front-end campaign submission form in Ambassadors, they are redirected to the login page. But what if they don’t have an account at all?

Charitable has always included a registration form – it can be added to a page with the [charitable_registration] shortcode – but previously there was no built-in way that the login form linked to the registration page. You could add a link to the page through the WordPress editor, but that didn’t handle redirections properly. This, for example, did not work:

  1. User tries to create a campaign through the front-end campaign form, but they’re not logged in so they are redirected to the login page.
  2. They don’t have an account, so they follow a link through to the registration page.
  3. After registering, the user isn’t redirected to the front-end campaign form — they’re redirected to their profile page instead, leaving the user confused and frustrated.

The Solution

That sucked, so we decided to fix it.

The Charitable login form will now automatically include a link to the registration page. When the user has been redirected to the login page after trying to access a private area, like in the example above, they are correctly redirected to the original page they tried to access after logging in or registering.

The registration page also includes a link back to the login form.

The text of both links can easily be customized when adding the shortcode. In the login form, you can set the registration_link_text parameter:

[charitable_login registration_link_text="Register"]

In the registration form, you can set the login_link_text parameter:

[charitable_registration login_link_text="Signed up already? Login instead."]

If you were using the Charitable shortcodes for login and registration before 1.4.2, you might have already added a way for people to get from the login page to the registration page (and vice versa). If that’s you and you want to get rid of the links added by Charitable, you can do that by setting the login_link_text and registration_link_text parameters to 0:

Another way we improved the registration form is that you can now specify the default page that users should be redirected to after registering. This used to default to the Profile page or homepage, so it is nice to have the flexibility to change this to a page that makes more sense for your platform. It’s done by simply adding a redirect parameter:

[charitable_registration redirect=""]

For the full documentation about the login and registration shortcodes, head over to the Account Shortcodes documentation.

What Else is New in 1.4.2

  • Added a column for the campaign creator to the campaigns page in the WordPress dashboard. #166
  • Added three new fields that can be displayed in donation-related emails, like the donation receipt or admin notification: the total amount donated, the campaign(s) that received the donation and the categories of the campaign(s) that received the donation. #202 and #203
  • Made sure that setting the order parameter in the [campaigns] shortcode works with lowercase and uppercase. ASC, DESC, asc and desc are all valid options now. #206
  • Fixed a bug that prevented the campaign end date from saving when using Charitable in a non-English installation. #201
  • Fixed a bug that prevented the comments section from appearing on campaigns when modal donations were enabled. #210
  • Fixed a bug that caused a PHP warning when trying to use the site_url email shortcode parameter in emails.

Upgrade to Charitable 1.4.2 in your WordPress dashboard or click here to download it.

Leave a Reply

Your email address will not be published. Required fields are marked *