blizzz comments 03.04.2017 with caching
Signed-off-by: Roger Szabo <roger.szabo@web.de>
This commit is contained in:
parent
33c8bf1857
commit
f49ff74943
|
@ -625,7 +625,12 @@ class User {
|
|||
$pwdChangedTime = array_key_exists('pwdchangedtime', $result[0]) ? $result[0]['pwdchangedtime'] : null;
|
||||
|
||||
//retrieve relevant password policy attributes
|
||||
$result = $this->access->search('objectclass=*', $ppolicyDN, ['cn','pwdgraceauthnlimit', 'pwdmaxage', 'pwdexpirewarning']);
|
||||
$cacheKey = 'ppolicyAttributes' . $ppolicyDN;
|
||||
$result = $this->connection->getFromCache($cacheKey);
|
||||
if(is_null($result)) {
|
||||
$result = $this->access->search('objectclass=*', $ppolicyDN, ['cn','pwdgraceauthnlimit', 'pwdmaxage', 'pwdexpirewarning']);
|
||||
$this->connection->writeToCache($cacheKey, $result);
|
||||
}
|
||||
|
||||
$pwdGraceAuthNLimit = array_key_exists('pwdgraceauthnlimit', $result[0]) ? $result[0]['pwdgraceauthnlimit'] : null;
|
||||
$pwdMaxAge = array_key_exists('pwdmaxage', $result[0]) ? $result[0]['pwdmaxage'] : null;
|
||||
|
|
Loading…
Reference in New Issue