Possible to find all content created by a certain user?

Vote:
 

Hi!

Given a user in EPiServer CMS, would it be possible to use the API and find all content created by him/her? If so, does anyone have some pseudo-code to point in the right direction?

Thank you!

//Marcus

#253522
Apr 19, 2021 6:52
Vote:
 

Your best bet would be using Find. Unfortunately IContentLoader and IContentRepository has no such method to filter by createdby

#253524
Apr 19, 2021 7:26
Vote:
 

Depending on your use case, this may not be the best option, but the database is always your friend!

SELECT * FROM tblContent WHERE CreatorName = 'markus'

If you want ALL content, Episerver Find is limited to content actually being indexed.

#253532
Edited, Apr 19, 2021 9:48
Vote:
 

@ Quan Mai

We're using Find but unfortunately not all content is indexed in Find.

@ Tomas Hensrud Gulla

Thanks for the suggestion! Can't see that tblContent will be changed in the near future :-)

#253551
Apr 19, 2021 11:30
Vote:
 

CreatorName is not indexed, so be careful about performance if you are running that query a lot.

#253552
Apr 19, 2021 12:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.