| | |
| | | function insert($event_name, $data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | $app->uses('system,getconf'); |
| | | |
| | | $security_config = $app->getconf->get_security_config('permissions'); |
| | | if($security_config['allow_shell_user'] != 'yes') { |
| | | $app->log('Shell user plugin disabled by security settings.',LOGLEVEL_WARN); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); |
| | | |
| | | if(!$app->system->is_allowed_user($data['new']['username'], false, false) |
| | |
| | | function update($event_name, $data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | $app->uses('system,getconf'); |
| | | |
| | | $security_config = $app->getconf->get_security_config('permissions'); |
| | | if($security_config['allow_shell_user'] != 'yes') { |
| | | $app->log('Shell user plugin disabled by security settings.',LOGLEVEL_WARN); |
| | | return false; |
| | | } |
| | | |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); |
| | | |
| | | if(!$app->system->is_allowed_user($data['new']['username'], false, false) |
| | |
| | | function delete($event_name, $data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | $app->uses('system,getconf'); |
| | | |
| | | $security_config = $app->getconf->get_security_config('permissions'); |
| | | if($security_config['allow_shell_user'] != 'yes') { |
| | | $app->log('Shell user plugin disabled by security settings.',LOGLEVEL_WARN); |
| | | return false; |
| | | } |
| | | |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['old']['parent_domain_id']); |
| | | |