Refactor User and TrustLevel a bit (PR #296)

  • rename User#password_required to User#password_required!
  • emails with “i” @ something are a special case as well
  • get rid of self. and returns where possible
  • prefer “unless a” instead of “if !a”
  • unread_notifications without manually iterating
  • introduce User#moderator?
  • introduce TrustLevel#valid_key?, TrustLevel#compare, and TrustLevel#level_key


You’ve signed the CLA, goshakkk. Thank you! This pull request is ready for review.

Overall I really like it, I just added a comment on a line that seems fishy to me. Let me know!

Awesome. Big improvement :fish:

There’s still a lot to clean up :sparkles:

A commit that appears in this pull request is being discussed here.