[encryption] fix getUser Helper

allow also paths starting with ```/user/cache/...```

cc  @PVince81 can you have a look at it? Would be nice to merge it for 6.0.1