[ingo] hooks: return true; ?
Jan Schneider
jan at horde.org
Thu Apr 23 08:38:58 UTC 2015
Zitat von trash at skrilnetz.net:
> Quoting Jan Schneider <jan at horde.org>:
>
>> Please don't top-post.
>>
>> Zitat von trash at skrilnetz.net:
>>
>>> Quoting Jan Schneider <jan at horde.org>:
>>>
>>>> Zitat von trash at skrilnetz.net:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have Ingo up and running but I was wondering what the 'return
>>>>> true' is for?
>>>>> Could someone please advice?
>>>>>
>>>>>
>>>>> // DEFAULT: Use hordeauth (identical to not defining hook at all).
>>>>> // return true;
>>>>>
>>>>> Thanks,
>>>>
>>>> Which hook are you talking about?
>>>>
>>> The default hook file (hook.php.dist) in the ingo/config directory.
>>>
>>> public function transport_auth($driver)
>>> {
>>> switch ($driver) {
>>> case 'foo':
>>> // Example #1: Use full Horde username for password.
>>> // This is generally needed for sieve servers.
>>> $full_user = $GLOBALS['registry']->getAuth(null);
>>> return array(
>>> 'euser' => $full_user,
>>> 'username' => $full_user
>>> );
>>
>> There is no "return true" anywhere in this code. Anyway, each hooks
>> has an individual signature, and all parameters and return values
>> are documented with the hook functions.
>>
>> --
>> Jan Schneider
>> The Horde Project
>> http://www.horde.org/
>> https://www.facebook.com/hordeproject
>>
>> --
>> ingo mailing list
>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>> To unsubscribe, mail: ingo-unsubscribe at lists.horde.org
>
> Well, there is. In the default ingo /ingo/config/hooks.php.dist file:
> http://pastebin.com/sEmvVvGX
The comment above that line explain exactly what it does and why, and
it's documented too in the phpdoc block above the hook function.
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
More information about the ingo
mailing list