• Resolved Dean Radish

    (@dean-radish)


    Hello. I host a web site for a small charity and I don’t have the luxury of paying for code. Your free plugin allows us to raise funds in ways that we would otherwise not be able to do, so a big thank you for providing the plugin free of charge.

    I use Paid Memberships Pro and Register Helper Add On to create registration forms for events. There is no member content on the web site and so I don’t require the username and password fields. I used the ‘pmpro_skip_account_fields’ filter to remove these fields and wanted to share some observations with you.

    – The validation requires that username and password are completed by the user, even if these fields are not displayed. I used the filter ‘pmpro_required_user_fields’ to modify the required fields but ideally the validation should behave differently if ‘pmpro_skip_account_fields’ is true.

    – I also need to allow an email address to be used in two or more registrations (a parent registers on behalf of two of more children) and I used the filter ‘pmpro_checkout_oldemail’. WordPress rejects the second user account creation. I was able to overcome this using other filters you provide, however before I did this the WordPress error message caused Paid Memberships Pro to display the message “Your payment was accepted, but there was an error ….” even though the payment had not been accepted (I use PayPal Standard).

    – The filter ‘pmpro_checkout_oldemail’ does not do what I think it was intended to do now that WordPress requires unique email addresses in user accounts. I used ‘pmpro_checkout_new_user_array’ and ‘pmpro_setup_new_user’ to bypass the WordPress validation during user account creation.

    These are minor issues for a minority use case and may not even be worth changing.

    once again, many thanks for the plugins and the great documentation on the web

    regards
    Dean

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi Dean,

    I’m glad to hear PMPro has been able to help you and that you are enjoying the plugin!

    I have relayed this to Jason, lead developer of PMPro to take a look over and advise.

    Here is a work around on allowing a user multiple levels, we are however currently working on a Multiple Levels Per User add-on for PMPro which should be released in the near future – https://www.paidmembershipspro.com/multiple-membership-levels-per-user-pmpro-workarounds/

    Thank you for the feedback it has been helpful. 🙂

    Have a great day further!

    @dean-radish, can you share your code on how you successfully

    1. created multiple accounts under the same email address?
    2. skipped validation for a certain “required field”? (I’m thinking of not requiring email for the child accounts but only username and password)

    Thank you.

    Thread Starter Dean Radish

    (@dean-radish)

    Hi @cwhlin,
    My code is at
    https://github.com/dean-radish/paid-memberships-woopro. I have this on my site as a plugin and use it for whatever customisations I need.
    This code hooks into ‘Register Helper Add On’ and ‘Paid Memberships Pro’ plugins so these are obviously required.
    ‘Allow Multiple Accounts’ is another plugin that I use that allows two or more accounts to exist in WordPress with the same email address. WordPress uses email address in the ‘forgot password’ routine, so it’s generally considered a security issue if you allow multiple accounts with the same email address but in my case where the users are parents and their children it was not a concern.
    My code is commented so you should be able to see what I’ve done and what is relevant to you.
    Email address is required by WordPress to create a user account, and used if the user forgets their password, so if you remove the email address field then you will need to substitute a value during account creation (see my code).
    I did this on my site so that a parent could register one or more of their children (who are too young for email addresses) for an event, but I was never 100% satisfied with the solution. If I were to do this again then I would instead have the membership form capture the parent and all their childrens details in a single registration, and use hooks to update the cost based on the number of children.
    Hope that helps
    Dean

    @dean-radish, thank you so much for this. I too have a website with the parents signing up for the kids. I was thinking of removing the email requirement altogether for the child’s account (and linking them to the parent account via PMPro’s Sponsored Member add-on) so I need to remove the email requirement (and use username only) … not sure if that can be done. Again, thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issues when removing username and password fields’ is closed to new replies.