Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Check for results before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Nov 10, 2011
1 parent 3907e9d commit 6382f3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/larper/__init__.py
Expand Up @@ -892,7 +892,8 @@ def get_user_by_email(email):

rs = conn.search_s(settings.LDAP_USERS_GROUP, ldap.SCOPE_SUBTREE,
search_filter)
return rs[0]
if rs:
return rs[0]


def get_user_by_uid(uid):
Expand Down

0 comments on commit 6382f3b

Please sign in to comment.