Best answer

User creation: WordPress erroring if user already exists

  • 29 June 2023
  • 3 replies
  • 165 views

Userlevel 1

Is there any way to add a logic that will ensure to enroll only a new user and skip the process of adding user into wordpress if user already exists

The challenge here zapier stops running and shuts itself off when we get already registered user to register once again..

 

Please help me out incase if there’s any possibility to resolve this issue

Process what I am trying to achieve here is

1. For a New user [ Payment gateway => Register on Wordpress => Course access on learndash] which is perfectly working fine

2. For a old user [Payment gateway ==> Register only if not registered previously ==> Course access] which is not working as there’s currently no way to identify the already existing users on wordpress.

icon

Best answer by SamB 29 June 2023, 11:04

View original

3 replies

Userlevel 7
Badge +11

Welcome to the Community, @Sal! 🙂

Hmm, it sounds like you’d need to use a “Find User” search action to check whether the user is already in Wordpress or not. There’s an existing feature request for that being discussed here:


So I’ve added your vote to that. I can’t make any promises on when that would be added but we’ll be sure to send you an email notification as soon as it is. 

In the meantime, I was thinking you might be able to use the API Request (Beta) WordPress action to search for the user. It looks like there’s a Retrieve a User endpoint that you could make a GET request to, but that appears to require a user ID to be supplied so if you don’t have that information available from the payment gateway then that’s not going to work.

The only other workaround I can think of would be to export a list of the WordPress users to a third Party app that you can search, like Google Sheets for example. That way you could use a Lookup Spreadsheet Row (Google Sheets) action to search the spreadsheet use a filter see if the user is already on there. And if not the Zap can add a new row to the spreadsheet once it’s registered them. Do you think that approach could work?

If you give that a try and run into any issues just let us know, happy to help further! 

Userlevel 1

I’ll give it a try and update you ASAP. Thanks so much

Userlevel 7
Badge +6

Hi there @Sal,

You are very welcome! I’m glad SamB was able to point you to the right direction. We’re glad you're willing to give the workaround a try. 

We appreciate your willingness to update us as soon as possible. If you need any assistance or have any questions along the way, feel free to ask. Good luck, and we look forward to hearing back from you! 😊

Reply