PDA

View Full Version : Ldap auth script help


zemic
04-13-2007, 12:24 PM
I've written a Vbulletin LDAP authentication script. Works great. I've never used the hooks / plugin system so would appreciate some advice / info...

At the moment I'm including my PHP code to authenticate the user at the top of login.php, as you can see below (a new include below the global.php include):



// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_ldapmodification.php');
require_once(DIR . '/includes/functions_login.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$vbulletin->input->clean_gpc('r', 'a', TYPE_STR);


When I do it this way, my code executes perfectly.

I've tried adding my code as a Plugin under the hook "Login Process". It doesnt do what it's suppose to. I think its being executed too late. Does anyone know the name of the hook which I can exectue my code before login.php starts or at the top of login.php ?? Its not a huge problem including it like I have done , it just would be tidier using the plugin system.

Any help appreciated,

Thanks,