[imp] Post-authentication hook is ignored (Horde 5.0.19)

Jan Schneider jan at horde.org
Thu Jan 17 12:43:23 UTC 2013


Zitat von mailing lists <listas.correo at yahoo.es>:

> Hello Jan,
>
> On 01/17/2013 12:46 PM, Jan Schneider wrote:
>
>> Zitat von mailing lists <listas.correo at yahoo.es>:
> [...]
>>> Any idea about why the postauth hook is not being executed?
>>
>> Read the documentation in the header of horde/config/hooks.php.dist.
>
> you must be referring to this:
>
>  * postauthenticate
>  * ----------------
>  * This hook is used to dynamically alter the login credentials after
>  * authentication occurs.
>  *
>  * Parameters in:
>  *   $userId (string): The Horde ID.
>  *   $credentials (array): The array of credentials used for authentication.
>  *
>  * The return value from this hook is as follows:
>  *   [throw Horde_Auth_Exception] - Fatal error.
>  *   false (boolean) - Authentication will fail.
>  *   true (boolean) - Authentication succeeds with no alteration of the
>  *                    credentials.
>  *   (array) - Replace the credentials with the given value.
>
> I did various tests and and none of them worked. Something as simple  
> as the following funcion is ignored.
>
> public function postauthenticate($userId, $credentials)
> {
>      return false;
> }
>
> (bug report: http://bugs.horde.org/ticket/11389 )
>
> sorry if I'm missing something very simple, but where is the error?

This is NOT a recent hooks.php.dist from Horde. Version 5.0.19 doesn't  
even exist by the way. It reads:

  * postauthenticate
  * ----------------
  * This hook is used to dynamically alter the login credentials after
  * authentication occurs.
  *
  * It is only called in Horde applications responsible for authentication.
  *
  * It is only called ONCE per session.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the imp mailing list