Closed psjbeisler closed 3 years ago
Two instances of \OCP\User in lib/config.php
do they need to be replaced? - as per https://nextcloud-server.netlify.app/classes/ocp-user#method_getUser
Any news on this? 😸
I can send a PR in a few days (my main system is off for a few days), but changing these 2 instances in lib/config.php is indeed enough for me:
diff -Naur epubreader.git/lib/config.php epubreader/lib/config.php
--- epubreader.git/lib/config.php 2021-08-02 11:36:25.073961784 +0200
+++ epubreader/lib/config.php 2021-07-06 14:43:30.407356502 +0200
@@ -25,7 +25,7 @@
* @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 @@
* @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);
}
/**
yeah couldn't install because of the error.
Updated from NC21 to NC22 and could not log in due to 500 errors
"version":"22.0.0.11","exception":{"Exception":"Error","Message":"Class 'OCP\\User' not found","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/epubreader/lib/Hooks.php","line":41,"function":"get","class":"OCA\\Epubreader\\Config","type":"::","args":["epub_enable","true"]}
had to
occ app:disable epubreader
https://github.com/nextcloud/server/issues/26407