Module: check_mk
Branch: master
Commit: efffc92fb869e0a7664cdd74aec987b298e61761
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=efffc92fb869e0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 13 14:55:52 2012 +0100
ldap: call the sync function only for new created users
---
web/htdocs/userdb.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index c2807b7..164fb44 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -97,6 +97,9 @@ def create_non_existing_user(connector_id, username):
users[username] = new_user_template(connector_id)
wato.save_users(users)
+ # Call the sync function for this new user
+ hook_sync(connector_id = connector_id, only_username = username)
+
# .----------------------------------------------------------------------.
# | _ _ _ |
# | | | | | ___ ___ | | _____ |
@@ -118,8 +121,6 @@ def hook_login(username, password):
if result == True:
# Check wether or not the user exists (and maybe create it)
create_non_existing_user(connector['id'], username)
- # Call the sync function for this new user
- hook_sync(connector_id = connector['id'], only_username =
username)
return result