disable an action when a user is already pending for approval

i have a sign up lightbox.
the sign up button is connected to triggered email.
when a new user signs up then he’s pending for approval by admin.

problem:
if a user is trying to sign up again (while he’s still pending) a second email is sent to him.

i have found a solution that may have work:


the only problem is that the new user are synced to the contact list and not an external database. (PrivateMembersData in this case)

is there any solution to access to contact list or alternately another solution at all?
thanks.

Hi,

When calling wixUsers.register the first time, an object is returned confirming that the user is pending admin approval. (“status”: “Pending”)
If a user then tries to register a second time 403 is returned.

You can use this logic to only send the email where appropriate.
In case 403 is returned, display an error notifying the user that he is already pending approval