thetuningspoon Posted June 10, 2014 Share Posted June 10, 2014 Is it possible to select a page by the person who created it? I tried find("createdUser.name=$userName") but that doesn't seem to work. Link to comment Share on other sites More sharing options...
adrian Posted June 10, 2014 Share Posted June 10, 2014 You can do this: $userid = $users->get("$userName")->id; $ps = $pages->find("created_users_id=$userid"); 6 Link to comment Share on other sites More sharing options...
horst Posted June 10, 2014 Share Posted June 10, 2014 (edited) I'm not sure and haven't tested, but have you tried something like: pages->find("created_user_id=$userid") EDIT: Adrian wins! Edited June 10, 2014 by horst Link to comment Share on other sites More sharing options...
3fingers Posted June 10, 2014 Share Posted June 10, 2014 Hey adrian, that "created_users_id" stands for a custom field or..? EDIT: Nevermind, found it in the cheatsheet Link to comment Share on other sites More sharing options...
thetuningspoon Posted June 11, 2014 Author Share Posted June 11, 2014 Works like a charm, thanks Adrian! Link to comment Share on other sites More sharing options...
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