$owner is not defined here

Fixes https://github.com/owncloud/core/issues/8539
Merge pull request #8540 from owncloud/fix-undefined

$owner is not defined here