kyle Posted July 10, 2013 Posted July 10, 2013 I took a look through the API but couldn't seem to find a way to get the pages created by a user. I was hoping that there would be some sort of array that tracks the pages that a user created and would be accessible with something like $user->pagesCreated(). If there isn't anything link this in processwire, how difficult would it be to create?
adrian Posted July 10, 2013 Posted July 10, 2013 I think this should do what you are looking for: $pages->find('created_users_id=n'); where n equals the id of the user you are looking for. If you are searching for the currently logged in user, you could replace this with $user->id PS, Welcome to PW! 4
renobird Posted July 10, 2013 Posted July 10, 2013 Hi Kyle, Welcome to the forums — adrian beat me to the response, but that's spot on.
kyle Posted July 10, 2013 Author Posted July 10, 2013 @adrian Thanks so much for the help. This was a preliminary question for my upcoming project, and I will let you know if I have any issues! Thanks for the welcome, I was lucky enough to find out about Processwire and it has quickly become my go-to CMS. @renobird Thank you! 1
renobird Posted July 10, 2013 Posted July 10, 2013 Kyle, One pointer (if you haven't figured this out already), use a search engine to search the forums. The forum search leaves something to be desired.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now