function ldap_servers_update_7109 in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_servers/ldap_servers.install \ldap_servers_update_7109()
Adjust group related fields to ldap_servers table.
File
- ldap_servers/
ldap_servers.install, line 371 - Install, update and uninstall functions for the LDAP API module.
Code
function ldap_servers_update_7109() {
if (!ldap_servers_db_field_exists('ldap_servers', 'groupNested')) {
db_add_field('ldap_servers', 'groupNested', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"groupNested" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupUseFirstAttr')) {
db_add_field('ldap_servers', 'groupUseFirstAttr', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg .= '<br/>' . t('"groupUseFirstAttr" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupSearchAll')) {
db_add_field('ldap_servers', 'groupSearchAll', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"groupSearchAll" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupUserMembershipsAttrExists')) {
db_add_field('ldap_servers', 'groupUserMembershipsAttrExists', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"groupUserMembershipsAttrExists" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupUserMembershipsAttr')) {
db_add_field('ldap_servers', 'groupUserMembershipsAttr', [
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
]);
$msg = t('"groupUserMembershipsAttr" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupMembershipsAttr')) {
db_add_field('ldap_servers', 'groupMembershipsAttr', [
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
]);
$msg = t('"groupMembershipsAttr" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupMembershipsAttrMatchingUserAttr')) {
db_add_field('ldap_servers', 'groupMembershipsAttrMatchingUserAttr', [
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
]);
$msg = t('"groupMembershipsAttrMatchingUserAttr" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupUserMembershipsAttrExists')) {
db_add_field('ldap_servers', 'groupUserMembershipsAttrExists', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"groupUserMembershipsAttrExists" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'groupUserMembershipsAttr')) {
db_add_field('ldap_servers', 'groupUserMembershipsAttr', [
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
]);
$msg = t('"groupUserMembershipsAttr" field added to ldap_servers table');
}
}