LDAP: fix db update for Postgres
This commit is contained in:
parent
0c57d94467
commit
7435064cd3
|
@ -130,7 +130,7 @@
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<index>
|
<index>
|
||||||
<name>ldap_group_members</name>
|
<name>ldap_group_members_index</name>
|
||||||
<unique>true</unique>
|
<unique>true</unique>
|
||||||
<field>
|
<field>
|
||||||
<name>owncloudname</name>
|
<name>owncloudname</name>
|
||||||
|
|
|
@ -34,7 +34,7 @@ $groupBE = new \OCA\user_ldap\GROUP_LDAP();
|
||||||
$groupBE->setConnector($connector);
|
$groupBE->setConnector($connector);
|
||||||
|
|
||||||
foreach($objects as $object) {
|
foreach($objects as $object) {
|
||||||
$fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping` WHERE `directory_uuid` = ""';
|
$fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping` WHERE `directory_uuid` = \'\'';
|
||||||
$updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?';
|
$updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?';
|
||||||
|
|
||||||
$query = OCP\DB::prepare($fetchDNSql);
|
$query = OCP\DB::prepare($fetchDNSql);
|
||||||
|
|
Loading…
Reference in New Issue