Actually, after further investigation, the custom permissions do allow this, albeit not very well, through the function add_mu_permission . This function however:
A while ago I created a commit on the Github repo for MultiUser 1.8.2, but the dev isn't very responsive (only for issue #2).
Check out the link, there's only one line of code to modify, and one other to add. I added the hook 'mu-save-user', & gave access to both $datau, and $xml, which are also available for the default GS hook 'settings-user'.
With this, anyone can set his own settings like so:
Btw you should create a new plugin in the Extend repo for MultiUser; not everyone checks the forum threads, many just download and may not be aware that you've created a better, updated version. If you have a Github account, we could collaborate on it
- only allows to save extra 'permissions' (so if a plugin dev wants to add other nodes outside the permissions, it is not possible, or at least hard)
- forces the permission to have a value of either NULL (true) or 'no' (false). Setting the XML node's value to 'false' actually evaluates to TRUE, which is funny to say the least.
- does not allow the user property to be updated/ transferred (when Multiuser is first activated) and instead overwrites the entire file, thus requiring the user to go to GS Settings tab > user management & set all permissions again.
A while ago I created a commit on the Github repo for MultiUser 1.8.2, but the dev isn't very responsive (only for issue #2).
Check out the link, there's only one line of code to modify, and one other to add. I added the hook 'mu-save-user', & gave access to both $datau, and $xml, which are also available for the default GS hook 'settings-user'.
With this, anyone can set his own settings like so:
PHP Code:
add_action('mu-save-user', 'myUserFunction');
function myUserFunction() {
// $datau holds old user info, as loaded by MU plugin
// $xml holds the new user info, just before it is saved
global $datau, $xml;
if (!isset($datau->myNode))
// do stuff based on the old settings
$xml->addChild('myNode','myValue'); // add node to XML
}
Btw you should create a new plugin in the Extend repo for MultiUser; not everyone checks the forum threads, many just download and may not be aware that you've created a better, updated version. If you have a Github account, we could collaborate on it