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?
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()?
It looks like you're new here. Sign in or register to get started.