Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
7cf69551
Commit
7cf69551
authored
Dec 14, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 229049: Make LDAP authentication work when there are multiple mail= attributes for an account.
Patch By Emmanuel Seyman <eseyman@linagora.com> r=mkanat, a=mkanat
parent
4734e258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
LDAP.pm
Bugzilla/Auth/Verify/LDAP.pm
+17
-1
No files found.
Bugzilla/Auth/Verify/LDAP.pm
View file @
7cf69551
...
...
@@ -37,6 +37,7 @@ use fields qw(
use
Bugzilla::
Constants
;
use
Bugzilla::
Error
;
use
Bugzilla::
User
;
use
Bugzilla::
Util
;
use
Net::
LDAP
;
...
...
@@ -90,7 +91,22 @@ sub check_credentials {
details
=>
{
attr
=>
$mail_attr
}
};
}
$params
->
{
bz_username
}
=
$user_entry
->
get_value
(
$mail_attr
);
my
@emails
=
$user_entry
->
get_value
(
$mail_attr
);
# Default to the first email address returned.
$params
->
{
bz_username
}
=
$emails
[
0
];
if
(
@emails
>
1
)
{
# Cycle through the adresses and check if they're Bugzilla logins.
# Use the first one that returns a valid id.
foreach
my
$email
(
@emails
)
{
if
(
login_to_id
(
$email
)
)
{
$params
->
{
bz_username
}
=
$email
;
last
;
}
}
}
}
else
{
$params
->
{
bz_username
}
=
$username
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment