function ldap_servers_features_rebuild in LDAP integration 6
Implementation of hook_features_rebuild(). [component_hook]
This is called the first time a feature is installed. It will add any non-existing servers to the site.
File
- ./
ldapauth.features.inc, line 134 - Feature related functions.
Code
function ldap_servers_features_rebuild($module) {
module_load_include('inc', 'ldapauth', 'includes/ldap.core');
$servers = module_invoke($module, 'default_ldap_servers');
foreach ($servers as $server) {
$existing_server = ldapauth_server_load($server['machine_name']);
if (empty($existing_server)) {
ldapauth_server_save($server);
}
}
}