Automatically add "registered" rank to all registered users. Closes #48

This commit is contained in:
Colin McDonald 2016-07-17 16:48:24 -04:00
parent 81a7806629
commit bc1cc8265f
1 changed files with 4 additions and 0 deletions

View File

@ -617,6 +617,10 @@ public final class User {
grantedRanks.add(grantedRank); grantedRanks.add(grantedRank);
} }
if (registeredAt != null) {
grantedRanks.add(Rank.findById("registered"));
}
if (grantedRanks.isEmpty()) { if (grantedRanks.isEmpty()) {
return ImmutableList.of(Rank.findById("default")); return ImmutableList.of(Rank.findById("default"));
} }