Jump to content

List of users doesn't display in Page field?


Lance O.
 Share

Recommended Posts

I've created a Page field that uses a custom hook (included in /site/read.php) that lists all users with a role of client.

$wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) {
    if($event->object->name == 'client') {
        $event->return = $event->pages->find('template=user,roles=client');
    }
});

When I log in as the superuser, the list of users displays correctly. However, when I log in using an admin role that I created, the list is empty. I've given full permissions to the "admin" role.

Why can't the admin role see the list of users?

The ultimate goal is to create a user with a client role, then assign the user to a specific page in the site using the Page field.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...