diff options
Diffstat (limited to 'phpBB/includes/auth')
-rw-r--r-- | phpBB/includes/auth/provider/interface.php | 11 | ||||
-rw-r--r-- | phpBB/includes/auth/provider/ldap.php | 31 |
2 files changed, 24 insertions, 18 deletions
diff --git a/phpBB/includes/auth/provider/interface.php b/phpBB/includes/auth/provider/interface.php index 40c48026cf..47043bc107 100644 --- a/phpBB/includes/auth/provider/interface.php +++ b/phpBB/includes/auth/provider/interface.php @@ -72,9 +72,14 @@ interface phpbb_auth_provider_interface * provider. * @param array $new_config Contains the new configuration values that * have been set in acp_board. - * @return string|null Returns null if not implemented or a string - * containing the name of the acp tempalte file for - * the authentication provider. + * @return array|null Returns null if not implemented or an array with + * the template file name and an array of the vars + * that the template needs that must conform to the + * following example: + * array( + * 'TEMPLATE_FILE' => string, + * 'TEMPLATE_VARS' => array(...), + * ) */ public function get_acp_template($new_config); diff --git a/phpBB/includes/auth/provider/ldap.php b/phpBB/includes/auth/provider/ldap.php index 288fb617f5..56f9c23d55 100644 --- a/phpBB/includes/auth/provider/ldap.php +++ b/phpBB/includes/auth/provider/ldap.php @@ -30,14 +30,12 @@ class phpbb_auth_provider_ldap extends phpbb_auth_provider_base * @param phpbb_db_driver $db * @param phpbb_config $config * @param phpbb_user $user - * @param phpbb_template $template */ - public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_user $user, phpbb_template $template) + public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_user $user) { $this->db = $db; $this->config = $config; $this->user = $user; - $this->template = $template; } /** @@ -302,18 +300,21 @@ class phpbb_auth_provider_ldap extends phpbb_auth_provider_base */ public function get_acp_template($new_config) { - $this->template->assign_vars(array( - 'AUTH_LDAP_DN' => $new_config['ldap_base_dn'], - 'AUTH_LDAP_EMAIL' => $new_config['ldap_email'], - 'AUTH_LDAP_PASSORD' => $new_config['ldap_password'], - 'AUTH_LDAP_PORT' => $new_config['ldap_port'], - 'AUTH_LDAP_SERVER' => $new_config['ldap_server'], - 'AUTH_LDAP_UID' => $new_config['ldap_uid'], - 'AUTH_LDAP_USER' => $new_config['ldap_user'], - 'AUTH_LDAP_USER_FILTER' => $new_config['ldap_user_filter'], - )); - - return 'auth_provider_ldap.html'; + $this->template->assign_vars(); + + return array( + 'TEMPLATE_FILE' => 'auth_provider_ldap.html', + 'TEMPLATE_VARS' => array( + 'AUTH_LDAP_DN' => $new_config['ldap_base_dn'], + 'AUTH_LDAP_EMAIL' => $new_config['ldap_email'], + 'AUTH_LDAP_PASSORD' => $new_config['ldap_password'], + 'AUTH_LDAP_PORT' => $new_config['ldap_port'], + 'AUTH_LDAP_SERVER' => $new_config['ldap_server'], + 'AUTH_LDAP_UID' => $new_config['ldap_uid'], + 'AUTH_LDAP_USER' => $new_config['ldap_user'], + 'AUTH_LDAP_USER_FILTER' => $new_config['ldap_user_filter'], + ), + ); } /** |