Hello guys,
Inside my mailalias.py, I'm using:
"default_from=lambda givenname, sn: '%s.%s@%s' % (givenname.lower(), sn.lower(), api.env.realm.lower()),"
Which pretty much blocks the user creation if the first- or last name contains a whitespace. Is there a function similar to "lower()", let's say a kind of "trim()" or anything else which removes whitespaces, or replaces them with a dash etc.?
It's a python question rather than an IPA one :)
You can combine split and join like this: "".join(givenname.split())
HTH,
flo
_______________________________________________
FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org
To unsubscribe send an email to freeipa-users-leave@lists.fedorahosted.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure