• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

New username in WordPress

Status
Not open for further replies.

NelsonE

Member
Hello,

I have a workflow that creates a WordPress user after a purchase. First, the workflow checks if the user exists in the WordPress user list by searching for their email address.

If the email does not exist, then the workflow creates a new user using information from WooCommerce.

However, I want to add an additional step. After checking the email, I want to check if the username being created (first name + last name combined) exists in WordPress. If it does not exist, then create a new user with this username.

My problem is when the username already exists. In this case, I want to create a unique username using the first name and last name fields from WooCommerce, maybe with a digit at the end or, eventually part of the first name and last name fields.

My questions are:
- How can I generate a unique username?
- Can I use “Text Transform” in Pabbly? If so, how do I do this?
- How can I ensure that the same username will not be repeated in the future?

Note: Email addresses should not be used as usernames.

Thank you,
Nelson
 

ArshilAhmad

Moderator
Staff member
Hi @NelsonE,

- How can I generate a unique username?
- Can I use “Text Transform” in Pabbly? If so, how do I do this?
You can use Text Formatter: Replace Text.
1686445173234.png

- How can I ensure that the same username will not be repeated in the future?
If you could map the digit added at the end of the Username from some place in your workflow that generates unique data, the username will never be repeated.
 
Status
Not open for further replies.
Top