prevent ugly errors if sync user hook is not found
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 29 Aug 2014 09:35:28 +0000 (11:35 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 4 Sep 2014 09:26:48 +0000 (11:26 +0200)
Change-Id: Ic6016baa74e4338e1f1d14240d39db15e738b7a8
Reviewed-on: http://gerrit.tine20.com/customers/1068
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/User.php

index 3107046..fa11ff1 100644 (file)
@@ -556,7 +556,7 @@ class Tinebase_User
     protected static function _syncUserHook(Tinebase_Model_FullUser $user, $userProperties)
     {
         $hookClass = Tinebase_Config::getInstance()->get(Tinebase_Config::SYNC_USER_HOOK_CLASS);
-        if ($hookClass) {
+        if ($hookClass && class_exists($hookClass)) {
             $hook = new $hookClass();
             if (method_exists($hook, 'syncUser')) {
                 if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__