#9076: prevent sql connection to email backend for cronuser
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 21 Oct 2013 12:51:24 +0000 (14:51 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 21 Oct 2013 15:07:21 +0000 (17:07 +0200)
- fixes re-registration of sql plugins

https://forge.tine20.org/mantisbt/view.php?id=9076

Change-Id: I1c1412aab07c93277b89c3b03756167c8e194c27
Reviewed-on: https://gerrit.tine20.org/tine20/2439
Tested-by: jenkins user
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/User/Sql.php

index 8453817..663935b 100644 (file)
@@ -84,17 +84,21 @@ class Tinebase_User_Sql extends Tinebase_User_Abstract
 
         $this->_db = Tinebase_Core::getDb();
         $this->_dbCommand = Tinebase_Backend_Sql_Command::factory($this->_db);
-        
-        $this->registerSqlPlugins();
     }
-    
+
     /**
-     * registerSqlPlugins
+     * registerPlugins
+     * 
+     * @param array $plugins
      */
-    public function registerSqlPlugins()
+    public function registerPlugins($plugins)
     {
+        parent::registerPlugins($plugins);
+        
         foreach ($this->_plugins as $plugin) {
             if ($plugin instanceof Tinebase_User_Plugin_SqlInterface) {
+                if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
+                    . " Registering " . get_class($plugin) . ' SQL plugin.');
                 $this->_sqlPlugins[] = $plugin;
             }
         }