#437 Email uniqueness in admin command; finalization

- Check also in admin command that email is not already used
- Misc bug fixing (logic errors, changes lost during large merge)
- Use "email" and "setemail" as main labels for /authme subcommands
This commit is contained in:
ljacqu
2016-02-06 21:56:08 +01:00
parent b4b679d3b9
commit 2cd2b48a1a
6 changed files with 15 additions and 22 deletions
@@ -33,6 +33,9 @@ public class SetEmailCommand implements ExecutableCommand {
if (auth == null) {
commandService.send(sender, MessageKey.UNKNOWN_USER);
return;
} else if (commandService.getDataSource().isEmailStored(playerEmail)) {
commandService.send(sender, MessageKey.EMAIL_ALREADY_USED_ERROR);
return;
}
// Set the email address