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.
Merge pull request #1062 from eguaj/3.2-A4509

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