Fix events for LDAP

This commit is contained in:
James Cole
2021-07-17 17:26:12 +02:00
parent 2c943e0d53
commit fae8c05e71
3 changed files with 23 additions and 8 deletions

View File

@@ -29,6 +29,7 @@ use FireflyIII\Models\Preference;
use FireflyIII\User;
use Illuminate\Support\Collection;
use Log;
use PDOException;
use Session;
/**
@@ -297,7 +298,11 @@ class Preferences
$pref->name = $name;
}
$pref->data = $value;
$pref->save();
try {
$pref->save();
} catch(PDOException $e) {
throw new FireflyException(sprintf('Could not save preference: %s', $e->getMessage()), 0, $e);
}
Cache::forever($fullName, $pref);
return $pref;