There was an error while loading. Please reload this page.
2 parents 32432c2 + 9f88450 commit a4d79fbCopy full SHA for a4d79fb
1 file changed
lib/Listener/SetUserDefaults.php
@@ -8,6 +8,7 @@
8
9
namespace OCA\Activity\Listener;
10
11
+use OCP\Config\Exceptions\UnknownKeyException;
12
use OCP\EventDispatcher\Event;
13
use OCP\EventDispatcher\IEventListener;
14
use OCP\IAppConfig;
@@ -52,12 +53,16 @@ private function setDefaultsForUser(IUser $user): void {
52
53
continue;
54
}
55
- $this->config->setUserValue(
56
- $user->getUID(),
57
- 'activity',
58
- $key,
59
- $this->appConfig->getValueString('activity', $key)
60
- );
+ try {
+ $this->config->setUserValue(
+ $user->getUID(),
+ 'activity',
+ $key,
61
+ $this->appConfig->getValueString('activity', $key)
62
+ );
63
+ } catch (UnknownKeyException) {
64
+ // ignore
65
+ }
66
67
68
// Mark settings as configured
0 commit comments