summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Auth/Verify
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-04 06:26:20 +0200
committermkanat%bugzilla.org <>2006-07-04 06:26:20 +0200
commitb1f4cf8bdc4b49c02ebebbee2553202bc46ab720 (patch)
tree8dddf198fa0cb29b5cef3833ff3469f07d34fdf7 /Bugzilla/Auth/Verify
parent49979b3775108f709cefbc9190eb9c7546aace94 (diff)
downloadbugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.gz
bugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.xz
Bug 342869: Use Bugzilla->params everywhere except templates
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Auth/Verify')
-rw-r--r--Bugzilla/Auth/Verify/LDAP.pm18
1 files changed, 10 insertions, 8 deletions
diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm
index 2ee5247ec..713619589 100644
--- a/Bugzilla/Auth/Verify/LDAP.pm
+++ b/Bugzilla/Auth/Verify/LDAP.pm
@@ -85,7 +85,7 @@ sub check_credentials {
my $user_entry = $detail_result->shift_entry;
- my $mail_attr = Param("LDAPmailattribute");
+ my $mail_attr = Bugzilla->params->{"LDAPmailattribute"};
if ($mail_attr) {
if (!$user_entry->exists($mail_attr)) {
return { failure => AUTH_ERROR,
@@ -106,17 +106,19 @@ sub check_credentials {
sub _bz_search_params {
my ($username) = @_;
- return (base => Param("LDAPBaseDN"),
+ return (base => Bugzilla->params->{"LDAPBaseDN"},
scope => "sub",
- filter => '(&(' . Param("LDAPuidattribute") . "=$username)"
- . Param("LDAPfilter") . ')');
+ filter => '(&(' . Bugzilla->params->{"LDAPuidattribute"}
+ . "=$username)"
+ . Bugzilla->params->{"LDAPfilter"} . ')');
}
sub _bind_ldap_anonymously {
my ($self) = @_;
my $bind_result;
- if (Param("LDAPbinddn")) {
- my ($LDAPbinddn,$LDAPbindpass) = split(":",Param("LDAPbinddn"));
+ if (Bugzilla->params->{"LDAPbinddn"}) {
+ my ($LDAPbinddn,$LDAPbindpass) =
+ split(":",Bugzilla->params->{"LDAPbinddn"});
$bind_result =
$self->ldap->bind($LDAPbinddn, password => $LDAPbindpass);
}
@@ -136,7 +138,7 @@ sub ldap {
my ($self) = @_;
return $self->{ldap} if $self->{ldap};
- my $server = Param("LDAPserver");
+ my $server = Bugzilla->params->{"LDAPserver"};
ThrowCodeError("ldap_server_not_defined") unless $server;
my $port = DEFAULT_PORT;
@@ -166,7 +168,7 @@ sub ldap {
|| ThrowCodeError("ldap_connect_failed", { server => $conn_string });
# try to start TLS if needed
- if (Param("LDAPstarttls")) {
+ if (Bugzilla->params->{"LDAPstarttls"}) {
my $mesg = $self->{ldap}->start_tls();
ThrowCodeError("ldap_start_tls_failed", { error => $mesg->error() })
if $mesg->code();