Check for duplicate e-mail before allowing sign up on Confluence

We are having some users forget they have accounts and create another account using their same e-mail address. This results in two users on Confluence with the same e-mail. We would expect that Confluence would check if the e-mail is already in use before allowing creation of another account. Is it possible to add this checking via any code added into the Velocity template or via a plug-in?

2 answers

I have found UserAccessor.getUsersByEmail and tried the following but it does not work and pager().isEmpty() returns true every time even if an already registered e-mail address is passed to it. Does anyone know of another method that can be used from within the Velocity context similar to UserAccessor.getUsersByEmail that is working?

function validateform() {
emailtocheck = document.signupform.email.value;
if($userAccessor.getUsersByEmail(emailtocheck).pager().isEmpty()) {
return true;
} else {
alert ('ERROR: A user with this e-mail address is already registered. If you think you already may have an account please try to recover your password using the Forgot Password tool instead.');
return false;
}

<form ... onsubmit="return validateform()">

Same question. Would be interesting to know. How to handle $userAccessor.getUsersByEmail()?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked May 24, 2018 in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

605 views 18 16
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you