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

Robert Collier September 15, 2011

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

0 votes
Stefan Baader September 15, 2013

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

0 votes
Robert Collier September 17, 2011

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()">

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events