| | |
| | | * The MongoDB client plugin is used by ISPConfig to control the management of MongoDB. |
| | | * If handles everything from creating DBs/Users, update them or delete them. |
| | | */ |
| | | |
| | | |
| | | class mongo_clientdb_plugin { |
| | | |
| | | /** |
| | |
| | | |
| | | return (bool) $conf['services']['db']; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This function is called when the plugin is loaded. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This function is called when a DB is updated from within the ISPConfig interface. |
| | | * Updating the DB needs a lot of changes. First, we need to recheck all users that |
| | |
| | | $this->disconnect(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This function is called when a DB is deleted from within the ISPConfig interface. |
| | | * All we need to do is to delete the database. |
| | |
| | | * @param array $data the event data (old and new) |
| | | */ |
| | | function db_user_insert($event_name,$data) {} |
| | | |
| | | |
| | | /** |
| | | * This function is called when a user is updated from within the ISPConfig interface. |
| | |
| | | $this->disconnect(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This function is called when a user is deleted from within the ISPConfig interface. |
| | | * Since MongoDB uses per-DB user management, we have to find every database where the user is |