From: Michael Tremer Date: Sun, 16 Jan 2011 15:21:27 +0000 (+0100) Subject: accounts: Fix email address detection if user has a umlaut in his name. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78fdedaeee7ae55d8433263322424cc273a86851;p=ipfire.org.git accounts: Fix email address detection if user has a umlaut in his name. --- diff --git a/www/webapp/backend/accounts.py b/www/webapp/backend/accounts.py index a0ad046a..e3ffd42d 100644 --- a/www/webapp/backend/accounts.py +++ b/www/webapp/backend/accounts.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# encoding: utf-8 import hashlib import ldap @@ -149,6 +150,12 @@ class Account(object): def email(self): name = self.cn.lower() name = name.replace(" ", ".") + name = name.replace("Ä", "Ae") + name = name.replace("Ö", "Oe") + name = name.replace("Ü", "Ue") + name = name.replace("ä", "ae") + name = name.replace("ö", "oe") + name = name.replace("ü", "ue") for mail in self.mail: if mail.startswith(name + "@"):