From cab11b30f4ac65db8660a627c2e46411bca3520c Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 1 Jul 2010 14:08:54 +0000 Subject: [PATCH] Added ability to return command results in plugin::callHook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18906 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../include/password-methods/class_password-methods.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc index 808d5950e..b933300e1 100644 --- a/gosa-core/include/password-methods/class_password-methods.inc +++ b/gosa-core/include/password-methods/class_password-methods.inc @@ -336,8 +336,15 @@ class passwordMethod { if($config->configRegistry->propertyExists('core', 'passwordProposalHook')){ $value = $config->configRegistry->getPropertyValue('core', 'passwordProposalHook'); - echo $value; + $core = new core($config); + + // No execute the hook and fetch the results. + plugin::callHook($core, 'passwordProposalHook', $addAttrs= array(), $ret); + if(count($ret) && !empty($ret[0])){ + return($ret[0]); + } } + return(''); } -- 2.30.2