aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/auth')
-rw-r--r--phpBB/includes/auth/auth_apache.php6
-rw-r--r--phpBB/includes/auth/auth_ldap.php23
2 files changed, 25 insertions, 4 deletions
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
index e5059724b9..4226c4ca53 100644
--- a/phpBB/includes/auth/auth_apache.php
+++ b/phpBB/includes/auth/auth_apache.php
@@ -8,8 +8,8 @@ function login_apache(&$username, &$password)
{
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_pw = ( !empty($HTTP_SERVER_VARS['PHP_AUTH_PW']) ) ? $HTTP_SERVER_VARS['PHP_AUTH_PW'] : $HTTP_GET_VARS['PHP_AUTH_PW']
+ $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'];
if ( $php_auth_user && $php_auth_pw )
{
@@ -18,7 +18,7 @@ function login_apache(&$username, &$password)
WHERE username = '" . str_replace("\'", "''", $username) . "'";
$result = $db->sql_query($sql);
- return ( $row = $db->sql_fetchrow($result) ? $row : false;
+ return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
return false;
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index 0957b56949..b09f6aeb33 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -32,7 +32,7 @@ function login_ldap(&$username, &$password)
WHERE username = '" . str_replace("\'", "''", $username) . "'";
$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;
}
+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
+
+}
+
?> \ No newline at end of file