resolving #9969

Resolving https://github.com/owncloud/core/issues/9969
I'd use in_array() thou