List<Message> messages) {
for (String scmAccount : scmAccounts) {
if (scmAccount.equals(login) || scmAccount.equals(email)) {
messages.add(Message.of("user.login_or_email_used_as_scm_account"));
} else {
<BUG>UserDto matchingUser = dbClient.userDao().selectNullableByScmAccountOrLoginOrName(dbSession, scmAccount);

if (matchingUser != null && (existingUser == null || !matchingUser.getId().equals(existingUser.getId()))) {
messages.add(Message.of("user.scm_account_already_used", scmAccount, matchingUser.getName(), matchingUser.getLogin()));
</BUG>
}

List<Message> messages) {
for (String scmAccount : scmAccounts) {
if (scmAccount.equals(login) || scmAccount.equals(email)) {
messages.add(Message.of("user.login_or_email_used_as_scm_account"));
} else {
List<UserDto> matchingUsers = dbClient.userDao().selectNullableByScmAccountOrLoginOrEmail(dbSession, scmAccount);
List<String> matchingUsersWithoutExistingUser = newArrayList();
for (UserDto matchingUser : matchingUsers) {
if (existingUser == null || !matchingUser.getId().equals(existingUser.getId())) {
matchingUsersWithoutExistingUser.add(matchingUser.getName() + " (" + matchingUser.getLogin() + ")");
