fix public preview creation if a user ios logged in
Merge pull request #6088 from owncloud/fix_public_previews

fix public preview creation if a user is logged in