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?
Same question. Would be interesting to know. How to handle $userAccessor.getUsersByEmail()?
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()">
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.