mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
- Apache auth plugin is working again
- LDAP auth plugin now supports OpenLDAP - fixed Authentication settings in ACP - preparatory ACP changes for the search git-svn-id: file:///svn/phpbb/trunk@5340 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -25,12 +25,12 @@ function login_apache(&$username, &$password)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$php_auth_user = (!empty($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : $_GET['PHP_AUTH_USER'];
|
||||
$php_auth_pw = (!empty($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : $_GET['PHP_AUTH_PW'];
|
||||
$php_auth_user = $_SERVER['PHP_AUTH_USER'];
|
||||
$php_auth_pw = $_SERVER['PHP_AUTH_PW'];
|
||||
|
||||
if ($php_auth_user && $php_auth_pw)
|
||||
if ((!empty($php_auth_user)) && (!empty($php_auth_pw)))
|
||||
{
|
||||
$sql = ' user_id, username, user_password, user_passchg, user_email, user_type
|
||||
$sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($username) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -36,6 +36,8 @@ function login_ldap(&$username, &$password)
|
||||
return 'Could not connect to LDAP server';
|
||||
}
|
||||
|
||||
@ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
|
||||
$search = @ldap_search($ldap, $config['ldap_base_dn'], $config['ldap_uid'] . '=' . $username, array($config['ldap_uid']));
|
||||
$result = @ldap_get_entries($ldap, $search);
|
||||
|
||||
@@ -79,15 +81,15 @@ function admin_ldap(&$new)
|
||||
|
||||
<dl>
|
||||
<dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . ':</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_server" size="40" name="ldap_server" value="' . $new['ldap_server'] . '" /></dd>
|
||||
<dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_dn" size="40" name="ldap_base_dn" value="' . $new['ldap_base_dn'] . '" /></dd>
|
||||
<dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . ':</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
|
||||
<dd><input type="text" id="ldap_uid" size="40" name="ldap_uid" value="' . $new['ldap_uid'] . '" /></dd>
|
||||
<dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd>
|
||||
</dl>
|
||||
';
|
||||
|
||||
|
Reference in New Issue
Block a user