Product Support

Participant Login

Provides username/password access to edit a Participants Database record.

Product Setup

To configure the plugin for use, start by making sure your “Participant Record Page” is correctly configured by visiting the “Record Form” tab in the main Participants Database settings. This tells the login form which page to go to when the login is accepted.

Setting up the Participant Record Page

Configure the Login Form

On the Participant Login settings page, you can configure the form to show one or two fields that the user will need to fill in to access their editable record. The first field is called the “Username” field, and it is used as the primary identifier. This can be an email address, an ID number of some kind, or really anything that can be used to uniquely identify the user.

The second field is called the “Password” field, but it can also be anything you want. It is usually used to verify the user, especially if the Username field is something that would be generally known, such as an email address. It is also possible to set up the form to use only a single input field by unchecking the “Require Password” checkbox. When this is unchecked, only the Username field will be shown in the form. You might do this if your username field was something only the user would know, such as an ID number.

When selecting the field to use for the password field, it is important understand that “password” type fields store the password in encrypted form, which means an administrator cannot know what the password is. If you need to be able to tell people what their password is, use a text-line field for your password field, then you will be able to look up their password because it will be stored in plaintext.

Create Your Login Page

Once you have configured the login form, you should create a page that will be the login page. On that page, place the [pdb_login] shortcode to show the login form. It is possible to use a custom template for the login form if you need.

This shortcode will accept the following attributes to configure how it looks and works:

  • template for using a custom template
  • record_page to set the page (use the page name or ID) that the user goes to after successfully logging in; that page must have the [pdb_record] shortcode.
  • login_button_text to set the text on the submit button for the login form

Persistent Login

When using the “Extended Access” preference, the user is automatically forwarded to the record edit page from the login page for 24 hours after successfully logging in. This period can be changed using a code filter.

Logout

To end the persistent login before it expires, you can use a logout link. You may need to use this if you have users that must have access to more than one record. The logout URL is simply the login URL with “?pdb-logout” appended to it. For example, if your Participants Database login page is at /pdb-login, your logout link would look like this:

/pdb-login?pdb-logout

If you are not using pretty permalinks, you need to do it slightly differently. For example, if your login page is on a page with an ID of 2034, your logout link would look like this:

/?p=2034&pdb-logout

It’s a good idea to put the logout link in a menu somewhere where the user can find it.

Product Settings

Login Form Settings

Username Field

SelectsĀ the field that holds the username. This could be an email address, a made-up username, or even a member ID number.Ā If the password is not required, this will be the only field shown. This field should hold a value that uniquely identifies the record. If more than one record matches the value, the first record found will be used.

Username Not Found Feedback Message

Message to show if the username does not match any record.

Require Password

If this is checked, both the username and the password must match an existing record for the login to be accepted. If unchecked, no password will be required, and a correct entry into the username field will take the user to the record edit screen. Be careful with this, it could allow data to be changed by unauthorized persons.

Password Field

This is where you set the field that is used for your”password.” If “Encrypt Passwords” is set (this is the default) only “password” type fields can be selected here. If you deselect the encryption preference, you can use any text field here, but not password fields. If you set this field to “required” (on the Manage Database Fields page) the user will be forced to type in their password when they edit their record. If the field is set to “not required” it will still be required in the login form.

Use Encrypted Password

You have the option to save the passwords as encrypted or unencrypted. If the passwords are encrypted, nobody will be able to know what the actual password is. This is to keep them secure in case of a breach. If you are using encrypted passwords, only a “password” type field may be used as the password field. If this is deselected, you may us any “text” type field for your password field. This may be preferable in situations where keeping the password encrypted is not needed, or if you want to use a regular text field for your password field, such as a member ID or other identifying field value. When deselected, the passwords are stored in plaintext and so will be visible. This would allow an admin to tell a user what their password is, for instance. Important: when changing this setting, you must save the settings twice: once to change this setting, then again to save theĀ “password field” selection.

Login Button Text

This is where you can set the text that is shown on the login form submit button.

Bad Password Feedback Message

Message shown if the password doesn’t match the value in the database.

If checked, a cookie is stored on the user’s browser when they successfully log in, so tha when they are directed to the record edit page, the URL does not show the private ID of the record. This can also be used to allow the user to bypass the login for a while if the setting below is set.

Extended Access

This sets the cookie to stay valid for 24 hours, allowing them to bypass the login for that period of time. This requires the the “Use Cookie” setting be selected as well. When a user with such a cookie visits the Participant Login page, they will be immediately redirected to their record edit screen. The 24-hour period can be changed to another value by using a code filter.

Password Recovery Settings

Provides a way to send the direct link to the user’s record so their password can be changed or recovered. This requires the the “Resend Private Link” functionality in Participants Database be correctly configured. This does not send the password or set a new password, it functions in the normal way for Participants Database: it provides the recipient with a private link to edit their record. They may use that link to change their password if they wish.

Lost Password Form Shortcode

This shortcode is used to generate the lost password form. This setting allows you to customize the shortcode, primarily so that a custom template may be used. the default value here isĀ 

Request your Private Link

.

Password recovery works by emailingĀ the user a “private link” which can be used to access their record edit page, bypassing the login form. When checked, this setting will change the private ID every time it is used to access the record edit page. This keeps the private link secure because it can only be used once. Don’t use this if your users need to be able to use a static URL to access their record edit page.Ā This setting has the effect of changing the private ID code every time the record is saved.

F.A.Q.

How does the "brute-force" protection work?

Every time the form is tried, the attempt is recorded with a timestamp and and the user’s IP. If there are over 10 attempts in a hour from a single IP, that IP is not allowed any more attempts for an hour.

Can I change the number of login attempts are allowed before the IP is shut out?

Yes, it quires the use of a filter callback. The number of attempts allowed is filtered by ‘pdb-login_max_attempts’ and defaults to 10. The time within which this number of attempts is allowed is filtered by ‘pdb-login_attempt_timeframe’ and defaults to 1 hour in seconds, or 3600.

What if someone loses or forgets their password?

The plugin uses the “Resend Private Link” function that Participants Database uses. There is a setting to include the link in the login form. If someone doesn’t know their password, when they click the link and enter their identifying information (usually an email) a “private link” is sent to them that they can use to access their record. They can change their password at that time if they wish.

Is there any way to find out what someone's password is?

If you are using encrypted passwords, there is no way to know what the password is. In that case, the user must set a new password. If you are using plaintext passwords, then yes, no problem, the password will be visible to an administrator. The password will also be visible to the user when they edit their record.

How secure is the login form?

The login form provides a reasonable amount of security for non-critical applications. While security is very important to the design and operation of Participants Database, the plugin is not recommended for storing high-value information such as credit card numbers, social security numbers, passwords, etc.

The level of security when using this plugin is largely determined by it’s configuration by the administrator. Security is always a trade-off between convenience and how hard it is to break in. If you opt for convenience, it will be at the expense of security, that’s just how it works.

This plugin is designed to be useful in low-security situations where things link single-field logins and plaintext passwords are desirable. The security can be enhanced by using encrypted strong passwords, and hard-to-guess usernames that are not publicly viewable.

How can I prevent the private ID from being seen in the URL after they log in?

In the Participant Login settings enable theĀ “Use Cookie” setting. Now, when someone uses the login form, they will be directed to the record edit form without any indication of the record ID or private ID in the URL.

Is it possible to direct the user to a different page depending on a value in their record?

Yes, there is a filter that is used to get the URL of the page the user goes to after they successfully log in. The filter is ‘pdb-login_after_validate_submission’ and it passes in the user’s record and whether it was validated or not. (This means this can also be used to change where they go if the login wasn’t valid.)

I have created a simple plugin that demonstrates how this can be done:

Redirect PDB Login

You can download this demo plugin and make the changes needed to work for your situation.

How can I add a CAPTCHA to the login form?

It is possible to add reCAPTCHA protection to the login form if you have the PDb reCAPTCHA add-on installed and working. You need to use a custom template, I have provided an example of the template you can use for this.

pdb-login-recaptcha.php

You will need to understand a bit about how custom templates are set up, ready this article for the details:

Using Participants Database Custom Templates

Once you have the template in the correct location, you can use that template in the login form with this shortcode:


Support Discussions for Participant Login

  • I have added the Login plugin to my new sight. I have everything set up, it appears to be working, except the Logout. I have the logout code (/3on3xLogin?pdb-logout) set and it does take me to the Login page (however there is no message that says you are logged out). After I have logged into my first record and made edits, I Logout and attempt to Login to any other record, it always take me to the first record. The browser is holding onto the credentials of the first Login.
    I don’t believe it’s your plugin but perhaps something in WordPress where cookies/session variable are being retained. Any thoughts? Thank you.

    • Check that you have any page caching turned off for the page with the [pdb_record] shortcode. Plugins that cache content have a way to exempt certain pages from caching. If you are not using a caching or accelerator plugin, the caching may be happening at the server level, this would be under the control of your web host, usually.

      There is no “log out” message, it’s not really possible to implement that since the logout link can go to any page…although it may be possible to configure a logged-out page, I’ll look into that.

  • Hello

    I want to update this plugin from version 1.12 to 1.17.1, but when I do, all the data on the front-end disappears. How can I do it?

    • And how can I change this text “You have been logged out.” when I log out?
      I need translate it to spanish.

      • This is in the translation files for the plugin, you will need to generate one for Spanish, there is no Spanish translation for the Participant Log plugin. It’s not hard, you need to get an application like Poedit to generate the translation file.

        Localizing Participants Database

        • Okay, I know how to do it with Poedit.
          Thanks

    • Can you be more specific about what happens and what you are seeing? Do you see any error in your php error log?

      • Hello
        No type of error appears.
        I’ll explain better: in the font-end I have my user logged in and all my data (name, etc.) appear. I update the plugin, go back to the front-end and all the data disappears. I log in again but my data does not appear. The rest of the content on the web looks good.

        • The error will be in your php error log, you need to be able to check that log to see what the problem is. Without more specific information, I can’t really help you solve the problem.

        • Is that in the error_log file no error appears. There is no other way to see what happens?
          It seems as if when changing the version, it did not recognize the shortcode or the data. Could it be that there is a big change between versions?

        • Which plugin did you upgrade?

          Do you see the record in the backend?

          When you log in, what exactly do you see? Dies it look like you logged in successfully?

          I’m sorry, there really is not enough detail for me to understand the problem.

        • When updating the plugin “Participant login” from version 1.12 to 1.17.1, the login fails. No error message appears either on the frontend or in the error_log file. It simply does not log in, so it does not give way to access the data. In 1.12 the login works fine but when updating to 1.17.1 it stops working.
          If you can see it live, tell me when you could and I’ll show you both versions.

        • There are dozens of changes between those two versions, so we’ll need more detail on how it is failing to get to the problem. When you attempt to log in, what do you see on the page the login takes you to? Are you using a password in your login form? What kind of field is it? Does the login fail for all accounts?

          The problem with php error logs is they are often not configured correctly and don’t catch all the errors. If you have the plugin debugging set to “verbose” the query that is used to determine the record will be logged. Clear the log, test the login then see what comes in to the log.

        • I update the plugin, I go to the login screen, fill in the email and password fields, it directs me to the page where my data is but none appears. I create a new login account and create it successfully. I log out to switch to the other user but it doesn’t log out. I go to another browser and try to enter with the data of the previous user and it does not show any data. I try it with the new user and neither. It always takes me to the data page but nothing comes out. It is as if it does not recognize the access but it does not say that the password or the user is wrong either.
          I cleared the error log and checked the box for it to log all the detailed errors. I send it to you by email.

  • Hi,
    I don’t get where to set up the logout.
    If I don’t use the extended access, is there a way to logout?
    I tried creating a separate page for a shortcode with [pdb_logout] but that doesn’t work.
    I can’t put the logout on the login page either. I currently have the signup and the login on the same page, which is nice. That means they don’t have to wait for the email before logging in. It usually takes 24 hours to receive the email. But then if they click on Login from anywhere on the site, it directs them to the Record page, meaning they can no longer access the login page to logout.

    If I use the extended access, I also don’t get where to direct the link to the logout.

    • For a user to log out, all they need to do is click a special link that goes to the login page. This link is constructed by adding ?pdb_logout to the link to the login page. This link can be placed in a menu or on any page (except the login page, as you’ve seen). There’s no shortcode, all you’re doing is providing a special link to the login page for your users to use to log out.

      • I put the logout link on a page and it brings people to the WordPress login screen, rather than the site’s login page. Why is that? What do I have to do to direct it to the site’s login page instead.

      • Never mind. I figured it out. My own stupidity. Thanks for being patient.

  • Is it possible to protect other pages behind the user login? For example, only show the participant list to logged in users?

    Hoping to go live with our new membership management system soon!

    • This is a general WordPress question, so there are various ways to do this. The plugin uses shortcodes, so you simply need to make the page with the shortcode private. You can either do that in the page editor or there are plugins that can help you manage private pages.

Got a Support Question?

You have to agree to the comment policy.

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.