| @@ 119-127 (lines=9) @@ | ||
| 116 | * @param string $uuid |
|
| 117 | * @return bool |
|
| 118 | */ |
|
| 119 | public function setDNbyUUID($fdn, $uuid) { |
|
| 120 | $query = $this->dbc->prepare(' |
|
| 121 | UPDATE `' . $this->getTableName() . '` |
|
| 122 | SET `ldap_dn` = ? |
|
| 123 | WHERE `directory_uuid` = ? |
|
| 124 | '); |
|
| 125 | ||
| 126 | return $this->modify($query, array($fdn, $uuid)); |
|
| 127 | } |
|
| 128 | ||
| 129 | /** |
|
| 130 | * Gets the name based on the provided LDAP DN. |
|
| @@ 228-234 (lines=7) @@ | ||
| 225 | * @param string $name |
|
| 226 | * @return bool |
|
| 227 | */ |
|
| 228 | public function unmap($name) { |
|
| 229 | $query = $this->dbc->prepare(' |
|
| 230 | DELETE FROM `'. $this->getTableName() .'` |
|
| 231 | WHERE `owncloud_name` = ?'); |
|
| 232 | ||
| 233 | return $this->modify($query, array($name)); |
|
| 234 | } |
|
| 235 | ||
| 236 | /** |
|
| 237 | * Truncate's the mapping table |
|