[dev] accessing $prefs from $conf[hooks][postauthenticate]

Jason Clifton jason at citydiesel.net
Wed Jun 27 18:02:25 UTC 2007


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?


function _horde_hook_postauthenticate($userID, $credential, $realm){
global $perms;
if($perms->getPermissions('horde:local_only') == 1){
//code here to validate subnet and return true or false
}else{
return true;
}
}


Thanks for the help
-- 
Jason Clifton
City Diesel
www.citydiesel.net


More information about the dev mailing list