[dev] accessing $prefs from $conf[hooks][postauthenticate]
Jan Schneider
jan at horde.org
Thu Jun 28 08:38:17 UTC 2007
Zitat von Chuck Hagenbuch <chuck at horde.org>:
> Quoting Jason Clifton <jason at citydiesel.net>:
>
>> I am writing a postauthenticate hook to force certain users to be on
>> the same subnet to be authenticated.
>>
>> I would like to use the horde permissions system for this but it
>> doesn't behave the way I would expect. The permission has been created
>> and can be accessed from horde.
>>
>> With the code below the permission doesnt seem to exist when executed
>> inside the hook, however if executed from the horde framework (with
>> php shell) it does exist.
>>
>> Is there a way to access this information within the postauthenticate hook?
>
> As far as I can think of it should work fine; can you be more specific
> than "doesn't seem to exist"? Do you get an error? Is the $perms
> object properly initialized and such?
I guess you meant the $prefs object.
But anyway, I don't think this will work, because the postauthenticate
hook is called *right* after the authentication, i.e. before loading
the prefs.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the dev
mailing list