| | |
| | | function insert($event_name,$data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | |
| | | if($app->system->is_user($data['new']['username'])) { |
| | | |
| | | /** |
| | | * Setup Jailkit Chroot System If Enabled |
| | | */ |
| | |
| | | |
| | | $app->log("Jalikit Plugin -> insert username:".$data['new']['username'],LOGLEVEL_DEBUG); |
| | | |
| | | } else { |
| | | $app->log("Jalikit Plugin -> insert username:".$data['new']['username']." skipped, the user does not exist.",LOGLEVEL_WARN); |
| | | } |
| | | |
| | | } |
| | | |
| | | //* This function is called, when a shell user is updated in the database |
| | | function update($event_name,$data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | |
| | | if($app->system->is_user($data['new']['username'])) { |
| | | |
| | | /** |
| | | * Setup Jailkit Chroot System If Enabled |
| | |
| | | |
| | | $app->log("Jalikit Plugin -> update username:".$data['new']['username'],LOGLEVEL_DEBUG); |
| | | |
| | | } else { |
| | | $app->log("Jalikit Plugin -> update username:".$data['new']['username']." skipped, the user does not exist.",LOGLEVEL_WARN); |
| | | } |
| | | |
| | | } |
| | | |
| | | //* This function is called, when a shell user is deleted in the database |
| | |
| | | function delete($event_name,$data) { |
| | | global $app, $conf; |
| | | |
| | | $app->uses('system'); |
| | | |
| | | if ($data['old']['chroot'] == "jailkit") |
| | | { |
| | | $app->uses("getconf"); |