Match ldap_uidattr_format case-insensitively (EJAB-1449)

This commit is contained in:
Evgeniy Khramtsov 2011-06-23 15:14:15 +10:00
parent 6cc6c04c4a
commit 35644cf73c
1 changed files with 8 additions and 1 deletions

View File

@ -95,7 +95,14 @@ get_user_part(String, Pattern) ->
{error, badmatch};
Result ->
case regexp:sub(Pattern, "%u", Result) of
{ok, String, _} -> {ok, Result};
{ok, StringRes, _} ->
case (string:to_lower(StringRes) ==
string:to_lower(String)) of
true ->
{ok, Result};
false ->
{error, badmatch}
end;
_ -> {error, badmatch}
end
end.