From bc1cc8265fea98087ab17a8faf63ac246b07f1f4 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sun, 17 Jul 2016 16:48:24 -0400 Subject: [PATCH] Automatically add "registered" rank to all registered users. Closes #48 --- src/main/java/net/frozenorb/apiv3/model/User.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/frozenorb/apiv3/model/User.java b/src/main/java/net/frozenorb/apiv3/model/User.java index ccaf005..55d7b8b 100644 --- a/src/main/java/net/frozenorb/apiv3/model/User.java +++ b/src/main/java/net/frozenorb/apiv3/model/User.java @@ -617,6 +617,10 @@ public final class User { grantedRanks.add(grantedRank); } + if (registeredAt != null) { + grantedRanks.add(Rank.findById("registered")); + } + if (grantedRanks.isEmpty()) { return ImmutableList.of(Rank.findById("default")); }