diff options
-rw-r--r-- | lib/private/share20/manager.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 7cd44a7cb37..76b28a5087f 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -595,9 +595,17 @@ class Manager implements IManager { if ($share->getPassword() !== null) { $share->setPassword($this->hasher->hash($share->getPassword())); } + + \OC_Hook::emit('OCP\Share', 'post_update_password', [ + 'itemType' => $share->getNode() instanceof \OCP\Files\File ? 'file' : 'folder', + 'itemSource' => $share->getNode()->getId(), + 'uidOwner' => $share->getSharedBy(), + 'token' => $share->getToken(), + 'disabled' => is_null($share->getPassword()), + ]); } - if ($share->getExpirationDate() !== $originalShare->getExpirationDate()) { + if ($share->getExpirationDate() != $originalShare->getExpirationDate()) { //Verify the expiration date $this->validateExpirationDate($share); $expirationDateUpdated = true; |