Fix User#getRanksScoped registered logic

This commit is contained in:
Colin McDonald 2016-07-17 17:47:04 -04:00
parent 57729c17e0
commit bc92c39ce0
1 changed files with 4 additions and 4 deletions

View File

@ -617,12 +617,12 @@ public final class User {
grantedRanks.add(grantedRank);
}
if (registeredAt != null) {
grantedRanks.add(Rank.findById("registered"));
if (grantedRanks.isEmpty()) {
grantedRanks.add(Rank.findById("default"));
}
if (grantedRanks.isEmpty()) {
return ImmutableList.of(Rank.findById("default"));
if (registeredAt != null) {
grantedRanks.add(Rank.findById("registered"));
}
// This is to remove redundant ranks. Say they have mod, mod-plus, admin, and youtuber,