Fix bug DNN-4533: update sp GetFoldersByPermissions to handle the situation when userid is null.