Jump to content

Only show certain roles in User List


MichaMichaMicha
 Share

Recommended Posts

I've a site with different sections. Each user is assigned to a section and each section has an editor.

I want those editors to be able to modify the users that are assigned to their section.

I tried hooking into ProcessUser::execute but I'm not sure how to filter the 'pages'.

$this->addHookBefore('ProcessUser::execute', $this, 'modifyuserpagelist'); 

In what way am I able to modify the User List?

Edited by MichaMichaMicha
Link to comment
Share on other sites

You want to hook into this method:

	public function ___executeList() {
		return $this->renderList("limit=25, status<" . Page::statusMax);
	}

It's defined in the superclass, ProcessPageType.

As the renderList method itself is not hookable, you'd need to generate your own markup which is returned from executeList()

  • Like 1
Link to comment
Share on other sites

You want to hook into this method:

	public function ___executeList() {
		return $this->renderList("limit=25, status<" . Page::statusMax);
	}

It's defined in the superclass, ProcessPageType.

As the renderList method itself is not hookable, you'd need to generate your own markup which is returned from executeList()

Great, that worked. Thanks!

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

×
×
  • Create New...