We want to disable the ability for users to add/create users in their Control Panel. But we'd like the feature to stay available to site administrators. What's the best way to do this?

Thanks

Comments

ferdi’s picture

One way would be to alter the access permission of the menu items https://github.com/openscholar/openscholar/blob/SCHOLAR-2-0-BETA14/sites...

Please follow up if you need more help with this.

Thanks !

kkitay’s picture

Ah, I see! And this will restrict access to the page itself?

kkitay’s picture

Priority: Normal » Major

Okay, it's not working. I created a custom module to alter the menu item cp/users. What am I missing? You guys are already ignoring these permissions you set up yourself, but when I go to use them it doesn't seem to work.

function useraccess_menu_alter(&$items)
{
	$items['cp/users']['access callback'] = "user_access";
	$items['cp/users']['access arguments'] = array('edit any vsite_users_profile_content');
}