[Freeipa-devel] UID and email address suggestion algorithms

Kevin McCarthy kmccarth at redhat.com
Thu Sep 6 00:28:37 UTC 2007


This code was committed previously, but deserves some discussion before
it sees the light of day.  Right now the code is in controllers.py:
suggest_uid and suggest_email.

The uid tries in the following order:
- givenname[0] + sn[:7]
- givenname[:7] + sn[0]
- (givenname + sn)[:8]
- sn[:8]
- lastly, it appends an incrementing counter to givenname[0] + sn[:7]

For the email address, the code isn't activated yet, but I suggest
trying:
- "%s.%s@%s" % (givenname, sn, domain)
- the result of suggest_uid() @domain

Comments?  Do you think the ordering is good?

-Kevin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20070905/42bbe9f7/attachment.bin>


More information about the Freeipa-devel mailing list