From 204c640c773e707845859d103b74d64596de402d Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Tue, 18 Jun 2013 15:57:31 -0400 Subject: [PATCH] [feature/auth-refactor] Make LDAP consistent with interface Makes the provider_ldap consistent with the provider_interface except for the acp() method which has not yet been finalized. Renames phpbb_auth_provider_ldap::user_filter to phpbb_auth_provider_ldap::ldap_user_filter to maintain the original name of the function from auth_ldap. PHPBB3-9734 --- phpBB/includes/auth/provider_ldap.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/auth/provider_ldap.php b/phpBB/includes/auth/provider_ldap.php index 3c54ba212c..3636c7ae6d 100644 --- a/phpBB/includes/auth/provider_ldap.php +++ b/phpBB/includes/auth/provider_ldap.php @@ -68,7 +68,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface $search = @ldap_search( $ldap, htmlspecialchars_decode($config['ldap_base_dn']), - ldap_user_filter($user->data['username']), + $this->ldap_user_filter($user->data['username']), (empty($config['ldap_email'])) ? array(htmlspecialchars_decode($config['ldap_uid'])) : array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])), @@ -102,7 +102,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface /** * Login function */ - public function login(&$username, &$password) + public function login($username, $password) { global $db, $config, $user; @@ -171,7 +171,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface $search = @ldap_search( $ldap, htmlspecialchars_decode($config['ldap_base_dn']), - ldap_user_filter($username), + $this->ldap_user_filter($username), (empty($config['ldap_email'])) ? array(htmlspecialchars_decode($config['ldap_uid'])) : array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])), @@ -275,7 +275,10 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface ); } - public function autologin(); + public function autologin() + { + return; + } /** * This function is used to output any required fields in the authentication @@ -335,7 +338,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface * * @return string A filter string for ldap_search */ - public function user_filter($username) + public function ldap_user_filter($username) { global $config;