app/soc/logic/accounts.py
changeset 1520 ac407f5b10dc
parent 1519 eb70b27696de
child 1527 0071733da7cd
--- a/app/soc/logic/accounts.py	Thu Feb 26 16:53:36 2009 +0000
+++ b/app/soc/logic/accounts.py	Thu Feb 26 16:54:08 2009 +0000
@@ -30,6 +30,17 @@
 import soc.logic.models.user
 
 
+def normalizeAccount(account):
+  """Returns a normalized version of the specified account.
+  """
+
+  normalized = str(account).lower()
+
+  if account.email() == normalized:
+    return account
+
+  return users.User(email=normalized)
+
 def isDeveloper(account=None, user=None):
   """Returns True if a Google Account is a Developer with special privileges.