Commit 0c989fa6 authored by Sandra Marsà's avatar Sandra Marsà Committed by Francesc Guasch
Browse files

feature(authentication): Add Attribute to LDAP (#1054)

close #1052
parent d963e399
......@@ -149,10 +149,17 @@ sub search_user {
$username = escape_filter_value($username);
my $filter = "($field=$username)";
if ( exists $$CONFIG->{ldap}->{filter} ) {
my $filter_config = $$CONFIG->{ldap}->{filter};
$filter_config = escape_filter_value($filter_config);
$filter = "(&($field=$username) ($filter_config))";
}
my $mesg = $ldap->search( # Search for the user
base => $base,
scope => 'sub',
filter => "($field=$username)",
filter => $filter,
typesonly => $typesonly,
attrs => ['*']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment