fix(offline): Use user's id instead of login in `Doc::isInDomain()` (refs #4509)

Change `Doc::isInDomain()` to work with user's id instead of login to be
compatible with changes made in Offline Server by #4447.