mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 03:48:53 +00:00
Fix errors, add admin output for ldap
git-svn-id: file:///svn/phpbb/trunk@2836 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
284dc92e08
commit
42d197b780
2 changed files with 25 additions and 4 deletions
|
@ -8,8 +8,8 @@ function login_apache(&$username, &$password)
|
||||||
{
|
{
|
||||||
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
|
global $HTTP_SERVER_VARS, $HTTP_ENV_VARS;
|
||||||
|
|
||||||
$php_auth_user = ( !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) ) ? $HTTP_SERVER_VARS['PHP_AUTH_USER'] : $HTTP_GET_VARS['PHP_AUTH_USER']
|
$php_auth_user = ( !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) ) ? $HTTP_SERVER_VARS['PHP_AUTH_USER'] : $HTTP_GET_VARS['PHP_AUTH_USER'];
|
||||||
$php_auth_pw = ( !empty($HTTP_SERVER_VARS['PHP_AUTH_PW']) ) ? $HTTP_SERVER_VARS['PHP_AUTH_PW'] : $HTTP_GET_VARS['PHP_AUTH_PW']
|
$php_auth_pw = ( !empty($HTTP_SERVER_VARS['PHP_AUTH_PW']) ) ? $HTTP_SERVER_VARS['PHP_AUTH_PW'] : $HTTP_GET_VARS['PHP_AUTH_PW'];
|
||||||
|
|
||||||
if ( $php_auth_user && $php_auth_pw )
|
if ( $php_auth_user && $php_auth_pw )
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ function login_apache(&$username, &$password)
|
||||||
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
return ( $row = $db->sql_fetchrow($result) ? $row : false;
|
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -32,7 +32,7 @@ function login_ldap(&$username, &$password)
|
||||||
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
return ( $row = $db->sql_fetchrow($result) ? $row : false;
|
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,4 +41,25 @@ function login_ldap(&$username, &$password)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function admin_ldap(&$new)
|
||||||
|
{
|
||||||
|
global $lang;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><?php echo $lang['LDAP_server']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_server_explain']; ?></span></td>
|
||||||
|
<td class="row2"><input type="text" size="40" name="ldap_server" value="<?php echo $new['ldap_server']; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><?php echo $lang['LDAP_dn']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_dn_explain']; ?></span></td>
|
||||||
|
<td class="row2"><input type="text" size="40" name="ldap_base_dn" value="<?php echo $new['ldap_base_dn']; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><?php echo $lang['LDAP_uid']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_uid_explain']; ?></span></td>
|
||||||
|
<td class="row2"><input type="text" size="40" name="ldap_uid" value="<?php echo $new['ldap_uid']; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue