]> snippets.scripts.mit.edu Git - Scripts/git/.git/commit
Function to create an MIT user with LDAP data
authorAlex Dehnert <adehnert@mit.edu>
Sun, 18 Dec 2011 05:49:59 +0000 (00:49 -0500)
committerAlex Dehnert <adehnert@mit.edu>
Tue, 20 Dec 2011 01:30:04 +0000 (20:30 -0500)
commitd4bd5af8ca7dc0954e7886e45e7ff55e901113b6
tree8ace38786154ced6e0d748125409f69d7bfc72b1
parentabab96a3e55d8663f996684add635ff7eaf472f6
Function to create an MIT user with LDAP data

This adds a function get_or_create_mit_user. As with the "get_or_create"
methods on managers, this returns an object satisfying some conditions,
creating it if necessary. In this case, we return a User object that's
populated using data from MIT's LDAP. If the user does not exist and
cannot be found in LDAP, we raise an exception.
__init__.py