Delete user if already exists

I’m not sure if that would be possible as I don’t think they’d get as far as triggering the hooks, but if it did work it could also open up the possibility of a kind of account takeover/griefing if you have an automated deletion of existing accounts.

I would recommend either disabling sign-ups for the connection, so they couldn’t attempt to register themselves and get into the user already exists issue; you would have a backend process that actually created the user and then the invite gives them a link to reset the password so they can access it.

Or, allow sign ups and have your invite be a link to a page on your site that will automatically redirect the user to an /authorize request which is configured to show the sign-up page instead of the default login page.

Please see this community FAQ for how to take a user straight to the sign-up page instead of the login page:

2 Likes