We have a SharePoint 2013 on-prem environment. We are using both sites and site collections as project rooms. On the front page of our intranet I need to list up all sites and site collections which a user is following, and I need to list up all site and site collections where a user is a member.
I don't know about any out of the box functionality to achieve this, and I want to avoid writing server side code with endless iterations. I am looking for some tips to do this in an optimal way.