apps/activity/lib/FilesHooks.php
/**
	 * Unharing a file or folder from a user
	 *
	 * @param IShare $share
	 * @throws \OCP\Files\NotFoundException
	 */
Unharing a file or folder from a user
@param IShare $share
@throws \OCP\Files\NotFoundException
Unharing a file or folder from a user @param IShare $share @throws \ OCP \ Files \ NotFoundException
protected function unshareFromUser(IShare $share) {
		$this->shareNotificationForSharer('unshared_user_self', $share->getSharedWith(), $share->getNodeId(), $share->getNodeType());
		if ($this->currentUser->getUID() !== null) {
			$this->shareNotificationForOriginalOwners($this->currentUser->getUID(), 'unshared_user_by', $share->getSharedWith(), $share->getNodeId(), $share->getNodeType());
		}
		$this->addNotificationsForUser(
			$share->getSharedWith(), 'unshared_by', [[$share->getNodeId() => $share->getTarget()], $this->currentUser->getUserIdentifier()],
			$share->getNodeId(), $share->getTarget(), $share->getNodeType() === 'file',
			$this->userSettings->getUserSetting($share->getSharedWith(), 'stream', Files_Sharing::TYPE_SHARED),
			$this->userSettings->getUserSetting($share->getSharedWith(), 'email', Files_Sharing::TYPE_SHARED) ? $this->userSettings->getUserSetting($share->getSharedWith(), 'setting', 'batchtime') : 0
		);
	}
protected function unshareFromUser ( IShare $ share ) { $ this -> shareNotificationForSharer ( 'unshared_user_self' , $ share -> getSharedWith ( ) , $ share -> getNodeId ( ) , $ share -> getNodeType ( ) ) ; if ( $ this -> currentUser -> getUID ( ) !== null ) { $ this -> shareNotificationForOriginalOwners ( $ this -> currentUser -> getUID ( ) , 'unshared_user_by' , $ share -> getSharedWith ( ) , $ share -> getNodeId ( ) , $ share -> getNodeType ( ) ) ; } $ this -> addNotificationsForUser ( $ share -> getSharedWith ( ) , 'unshared_by' , [ [ $ share -> getNodeId ( ) => $ share -> getTarget ( ) ] , $ this -> currentUser -> getUserIdentifier ( ) ] , $ share -> getNodeId ( ) , $ share -> getTarget ( ) , $ share -> getNodeType ( ) === 'file' , $ this -> userSettings -> getUserSetting ( $ share -> getSharedWith ( ) , 'stream' , Files_Sharing :: TYPE_SHARED ) , $ this -> userSettings -> getUserSetting ( $ share -> getSharedWith ( ) , 'email' , Files_Sharing :: TYPE_SHARED ) ? $ this -> userSettings -> getUserSetting ( $ share -> getSharedWith ( ) , 'setting' , 'batchtime' ) : 0 ) ; }
Unharing a file or folder from a user
 @param IShare $share
 @throws \OCP\Files\NotFoundException
Unharing a file or folder from a user @param IShare $share @throws \ OCP \ Files \ NotFoundException
// User performing the share // Owner // Recipient