]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/default_badges/badges.py
ValidatedEmail badge should be awarded only once
[osqa.git] / forum_modules / default_badges / badges.py
index 893d32a322457732e8acbc299d930383ef9762a1..ac02899b0ef2eff969ebb592c3a1ae7570d60b0d 100644 (file)
@@ -320,3 +320,12 @@ class Taxonomist(AbstractBadge):
     def award_to(self, action):
         return None
 
+class ValidatedEmail(AbstractBadge):
+    type = Badge.BRONZE
+    listen_to = (EmailValidationAction,)
+    name = _("Validated Email")
+    description = _("User who has validated email associated to the account")
+    award_once = True
+
+    def award_to(self, action):
+        return action.user
\ No newline at end of file