LDAP Login on 3.2

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
14|88
Registered User
Posts: 2
Joined: Wed Dec 20, 2017 12:16 pm

LDAP Login on 3.2

Post by 14|88 » Wed Dec 20, 2017 12:46 pm

Heyo

I recently upgraded from 3.0.12 to 3.2 and I'm in the process of updating everything to make sure it works before it's released.

About a week ago I noticed that my logins no longer worked on the 3.2 version of the board. After some investigation I saw that the old forum was using an authentication method called auth_ldap_db, it seems to be costume made and checks the LDAP server before checking the phpbb database for the user info.

This method of authenticating isn't working on 3.2. It doesn't even appear on the list of authentication methods which can be selected in the Client Communication section of the ACP so I'm wondering how do I get this to appear on the list and be usable on 3.2?

The file name is auth_ldap_db.php located in root/includes/auth/ and the code is as follows

Code: Select all

<?php

include_once($phpbb_root_path . 'includes/auth/auth_ldap.' . $phpEx);
include_once($phpbb_root_path . 'includes/auth/auth_db.' . $phpEx);

function init_ldap_db()
{
        init_ldap();
}

function login_ldap_db($username, $password)
{
    $test_login_ldap = login_ldap($username, $password);

    if (($test_login_ldap[status] == LOGIN_SUCCESS)||($test_login_ldap[status] == LOGIN_SUCCESS_CREATE_PROFILE))
    {
            return $test_login_ldap;
    }

    return login_db($username, $password);
}
Last edited by 14|88 on Wed Dec 20, 2017 3:31 pm, edited 1 time in total.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19116
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: LDAP Login on 3.2

Post by Mick » Wed Dec 20, 2017 12:54 pm

"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

14|88
Registered User
Posts: 2
Joined: Wed Dec 20, 2017 12:16 pm

Re: LDAP Login on 3.2

Post by 14|88 » Wed Dec 20, 2017 3:31 pm

I've seen that but it doesn't tell me what I need.

When trying to use the LDAP service that ships with PHPBB I get a response that reads "Could not find a login identity for admin.".

On the previous one (3.0.12) it used auth_ldap_db as stated above and that worked, but I can't find any info on how to make it selectable on 3.2.

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: Asyouwanto, david63, Ger and 5 guests