This question has been answered by sottwell. See the first response.
If I'm understanding your correctly, the answer is probably no. If you have a user group that is granted permission to create, edit, and delete users, ALL users will be editable by members of that group. To my knowledge there is no way to make a specific user untouchable.
It's theoretically possible to write code that checks the current user and removes names of protected users from the drop-down list of names in User Management, but it's extremely difficult.
))))<?php
/**
* Loads the user list
*
* @package modx
* @subpackage manager.controllers
*/
class SecurityUserManagerController extends modManagerController {
/**
* Check for any permissions or requirements to load page
* @return bool
*/
public function checkPermissions() {
return $this->modx->hasPermission('edit_user');
}
/**
* Register custom CSS/JS for the page
* @return void
*/
public function loadCustomCssJs() {
$mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
$this->addJavascript($mgrUrl.'assets/modext/widgets/security/modx.grid.user.js');
$this->addJavascript($mgrUrl.'assets/modext/sections/security/user/list.js');
$this->addHtml("<script>
Ext.onReady(function() {
MODx.add('modx-page-users');
});</script>");
}
/**
* Custom logic code here for setting placeholders, etc
* @param array $scriptProperties
* @return mixed
*/
public function process(array $scriptProperties = array()) {}
/**
* Return the pagetitle
*
* @return string
*/
public function getPageTitle() {
return $this->modx->lexicon('users');
}
/**
* Return the location of the template file
* @return string
*/
public function getTemplateFile() {
return '';
}
/**
* Specify the language topics to load
* @return array
*/
public function getLanguageTopics() {
return array('user');
}
/**
* Get the Help URL
* @return string
*/
public function getHelpUrl() {
return 'Users';
}
}Never meddle with the core code files.Quote from: BobRay at Mar 26, 2015, 10:33 PM
I agree with Susan.
$c->where(array('modUser.username:NOT LIKE' => 'Superadmin'));$c->leftJoin('modUserProfile','Profile');
)))))))))