mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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
This commit is contained in:
parent
57689948e2
commit
204c640c77
1 changed files with 8 additions and 5 deletions
|
@ -68,7 +68,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface
|
||||||
$search = @ldap_search(
|
$search = @ldap_search(
|
||||||
$ldap,
|
$ldap,
|
||||||
htmlspecialchars_decode($config['ldap_base_dn']),
|
htmlspecialchars_decode($config['ldap_base_dn']),
|
||||||
ldap_user_filter($user->data['username']),
|
$this->ldap_user_filter($user->data['username']),
|
||||||
(empty($config['ldap_email'])) ?
|
(empty($config['ldap_email'])) ?
|
||||||
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
||||||
array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
|
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
|
* Login function
|
||||||
*/
|
*/
|
||||||
public function login(&$username, &$password)
|
public function login($username, $password)
|
||||||
{
|
{
|
||||||
global $db, $config, $user;
|
global $db, $config, $user;
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface
|
||||||
$search = @ldap_search(
|
$search = @ldap_search(
|
||||||
$ldap,
|
$ldap,
|
||||||
htmlspecialchars_decode($config['ldap_base_dn']),
|
htmlspecialchars_decode($config['ldap_base_dn']),
|
||||||
ldap_user_filter($username),
|
$this->ldap_user_filter($username),
|
||||||
(empty($config['ldap_email'])) ?
|
(empty($config['ldap_email'])) ?
|
||||||
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
array(htmlspecialchars_decode($config['ldap_uid'])) :
|
||||||
array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
|
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
|
* 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
|
* @return string A filter string for ldap_search
|
||||||
*/
|
*/
|
||||||
public function user_filter($username)
|
public function ldap_user_filter($username)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue