Fix caching of DN in LDAP source

pull/17/merge
Francis Lachapelle 2014-02-05 09:04:00 -05:00
parent 3950e9d4c3
commit 826537ed01
1 changed files with 5 additions and 4 deletions

View File

@ -549,10 +549,6 @@ static Class NSStringK;
if (userDN)
{
// We cache the _login <-> userDN entry to speed up things
[[SOGoCache sharedCache] setDistinguishedName: userDN
forLogin: _login];
if (!passwordPolicy)
didBind = [bindConnection bindWithMethod: @"simple"
binddn: userDN
@ -564,6 +560,11 @@ static Class NSStringK;
perr: (void *)_perr
expire: _expire
grace: _grace];
if (didBind)
// We cache the _login <-> userDN entry to speed up things
[[SOGoCache sharedCache] setDistinguishedName: userDN
forLogin: _login];
}
}
}