Update User.php

Makes the time between needsRefresh configurable via app config option updateAttribuesInterval.
Default is still 86400 secons which is one day.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
sidey79 2017-08-04 22:54:48 +02:00 committed by Arthur Schiwon
parent 1a2f9fe678
commit 0b290c0904
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 1 additions and 2 deletions

View File

@ -387,8 +387,7 @@ class User {
$lastChecked = $this->config->getUserValue($this->uid, 'user_ldap',
self::USER_PREFKEY_LASTREFRESH, 0);
//TODO make interval configurable
if((time() - intval($lastChecked)) < 86400 ) {
if((time() - intval($lastChecked)) < $this->config->getAppValue('user_ldap', 'updateAttribuesInterval', 86400) ) {
return false;
}
return true;