From: Michael Tremer Date: Thu, 15 Aug 2019 13:50:25 +0000 (+0100) Subject: people: Force all UIDs to be lowercase X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16048b226a6f165e00edecb11a22da773f6ddea3;p=ipfire.org.git people: Force all UIDs to be lowercase Signed-off-by: Michael Tremer --- diff --git a/src/backend/accounts.py b/src/backend/accounts.py index 1b59882c..fe65126c 100644 --- a/src/backend/accounts.py +++ b/src/backend/accounts.py @@ -166,8 +166,11 @@ class Accounts(Object): # Registration def register(self, uid, email, first_name, last_name): + # Convert all uids to lowercase + uid = uid.lower() + # Check if UID is unique - if self.get_by_uid(uid): + if self.uid_exists(uid): raise ValueError("UID exists: %s" % uid) # Generate a random activation code