Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: LDAP authentication not logged [ Reply ]
By: Chanh TRAN on 2016-02-09 12:57
[forum:879]
Finally, I managed to have things work w/ small changes inside /pluginsgforge/www/plugins/authldap/post-login.php

From

#####

if ($login) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
exit_form_double_submit();
}
$test = $plugin->checkLDAPCredentials(strtolower($form_loginname),$form_pw);
if ($test == FORGE_AUTH_AUTHORITATIVE_ACCEPT && user_get_object_by_name($form_loginname)->getStatus() == 'A') {
if ($plugin->isSufficient()) {
$plugin->startSession($form_loginname);
}

if ($return_to) {
header ("Location: " . util_make_url($return_to));
exit;
} else {

#####

To

###

if ($login) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
exit_form_double_submit();
}
$test = $plugin->checkLDAPCredentials(strtolower($form_loginname),$form_pw);
if ($test == FORGE_AUTH_AUTHORITATIVE_ACCEPT && user_get_object_by_name($form_loginname)->getStatus() == 'A') {
if ($plugin->isSufficient()) {
$plugin->startSession($form_loginname);
}



$u = user_get_object_by_name($form_loginname);
$user_id = $u->getID();
session_set_new($user_id); //create session cookie


if ($return_to) {
header ("Location: " . util_make_url($return_to));
exit;
} else {


LDAP authentication not logged [ Reply ]
By: Chanh TRAN on 2016-02-08 15:40
[forum:878]
Hi all,
I'm testing FF5.3.4 & my question here is why all 'built-in' autthentication 're logged in table 'user_session' whereas it's not the case at all for 'LDAP' ?
Is there anyway to have this work also for LDAP ?
Thx in advance for any help
Regards