#442 Fix email presence check being case-insensitive

- Add integration tests
- Change DataSource interface to return the number of accounts only, since that's all we require
This commit is contained in:
ljacqu
2016-02-21 21:38:29 +01:00
parent 203e954eea
commit e8f518711c
7 changed files with 61 additions and 38 deletions
@@ -98,7 +98,7 @@ public class AsyncRegister {
private void emailRegister() {
if (Settings.getmaxRegPerEmail > 0
&& !plugin.getPermissionsManager().hasPermission(player, PlayerStatePermission.ALLOW_MULTIPLE_ACCOUNTS)
&& database.getAllAuthsByEmail(email).size() >= Settings.getmaxRegPerEmail) {
&& database.countAuthsByEmail(email) >= Settings.getmaxRegPerEmail) {
m.send(player, MessageKey.MAX_REGISTER_EXCEEDED);
return;
}