From 5443371196d84583564f97a38b611a13955b5d88 Mon Sep 17 00:00:00 2001 From: arnested Date: Thu, 20 Dec 2012 11:37:05 +0100 Subject: [PATCH] Bail out ldap_profile_user_login() if this is the admin user or the anonymous user. Reply-To: Arne =?UTF-8?Q?J=C3=B8rgensen?= --- ldap_profile/ldap_profile.module | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ldap_profile/ldap_profile.module b/ldap_profile/ldap_profile.module index 524501a..e535bd8 100644 --- a/ldap_profile/ldap_profile.module +++ b/ldap_profile/ldap_profile.module @@ -74,6 +74,11 @@ function ldap_profile_info($field = 0) { * Implements hook_user_login(). */ function ldap_profile_user_login(&$edit, $account) { + // Bail out if this is the admin user or the anonymous user. + if ($account->uid == 1 || $account->uid == 0) { + return; + } + $servers = ldap_servers_get_servers(NULL, 'enabled'); $server = 0; $changes = array(); -- 1.8.0.2