Update deprecated OCP\User

This was dropped in Nextcloud 22

Closes #36
This commit is contained in:
Bernard Cafarelli 2021-08-04 10:49:55 +02:00
parent c704a85a67
commit 71a766a629
No known key found for this signature in database
GPG Key ID: 5A761FC3AEC20F13

View File

@ -25,7 +25,7 @@ class Config
* @return string retrieved value or default
*/
public static function get($key, $default) {
return \OC::$server->getConfig()->getUserValue(\OCP\User::getUser(), 'epubreader', $key, $default);
return \OC::$server->getConfig()->getUserValue(\OC_User::getUser(), 'epubreader', $key, $default);
}
/**
@ -36,7 +36,7 @@ class Config
* @return bool success
*/
public static function set($key, $value) {
return \OC::$server->getConfig()->setUserValue(\OCP\User::getUser(), 'epubreader', $key, $value);
return \OC::$server->getConfig()->setUserValue(\OC_User::getUser(), 'epubreader', $key, $value);
}
/**