Merge pull request #37 from voyageur/nc22

Fix deprecated OCP\User (thanks @voyageur)
This commit is contained in:
e-alfred 2021-08-07 21:52:33 +02:00 committed by GitHub
commit 132433fc1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -46,6 +46,6 @@ See [README] for more exhaustive information on features and potential misfeatur
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-00.jpg?raw=true</screenshot> <screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-00.jpg?raw=true</screenshot>
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-02.jpg?raw=true</screenshot> <screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-02.jpg?raw=true</screenshot>
<dependencies> <dependencies>
<nextcloud min-version="17" max-version="21"/> <nextcloud min-version="17" max-version="22"/>
</dependencies> </dependencies>
</info> </info>

View File

@ -25,7 +25,7 @@ class Config
* @return string retrieved value or default * @return string retrieved value or default
*/ */
public static function get($key, $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 * @return bool success
*/ */
public static function set($key, $value) { 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);
} }
/** /**