mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Clean up models.
Clean up models.
This commit is contained in:
@@ -30,6 +30,7 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\Preference;
|
use FireflyIII\Models\Preference;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
|
use JsonException;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,7 +93,11 @@ class DecryptDatabase extends Command
|
|||||||
// A separate routine for preferences:
|
// A separate routine for preferences:
|
||||||
if ('preferences' === $table) {
|
if ('preferences' === $table) {
|
||||||
// try to json_decrypt the value.
|
// try to json_decrypt the value.
|
||||||
$value = json_decode($value, true, 512, JSON_THROW_ON_ERROR) ?? $value;
|
try {
|
||||||
|
$value = json_decode($value, true, 512, JSON_THROW_ON_ERROR) ?? $value;
|
||||||
|
} catch(JsonException $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
}
|
||||||
Log::debug(sprintf('Decrypted field "%s" "%s" to "%s" in table "%s" (row #%d)', $field, $original, print_r($value, true), $table, $id));
|
Log::debug(sprintf('Decrypted field "%s" "%s" to "%s" in table "%s" (row #%d)', $field, $original, print_r($value, true), $table, $id));
|
||||||
|
|
||||||
/** @var Preference $object */
|
/** @var Preference $object */
|
||||||
|
24
app/User.php
24
app/User.php
@@ -114,6 +114,30 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
* @method static Builder|User whereReset($value)
|
* @method static Builder|User whereReset($value)
|
||||||
* @method static Builder|User whereUpdatedAt($value)
|
* @method static Builder|User whereUpdatedAt($value)
|
||||||
* @mixin Eloquent
|
* @mixin Eloquent
|
||||||
|
* @property string|null $objectguid
|
||||||
|
* @property-read int|null $accounts_count
|
||||||
|
* @property-read int|null $attachments_count
|
||||||
|
* @property-read int|null $available_budgets_count
|
||||||
|
* @property-read int|null $bills_count
|
||||||
|
* @property-read int|null $budgets_count
|
||||||
|
* @property-read int|null $categories_count
|
||||||
|
* @property-read int|null $clients_count
|
||||||
|
* @property-read int|null $currency_exchange_rates_count
|
||||||
|
* @property-read int|null $import_jobs_count
|
||||||
|
* @property-read int|null $notifications_count
|
||||||
|
* @property-read int|null $piggy_banks_count
|
||||||
|
* @property-read int|null $preferences_count
|
||||||
|
* @property-read int|null $recurrences_count
|
||||||
|
* @property-read int|null $roles_count
|
||||||
|
* @property-read int|null $rule_groups_count
|
||||||
|
* @property-read int|null $rules_count
|
||||||
|
* @property-read int|null $tags_count
|
||||||
|
* @property-read int|null $tokens_count
|
||||||
|
* @property-read int|null $transaction_groups_count
|
||||||
|
* @property-read int|null $transaction_journals_count
|
||||||
|
* @property-read int|null $transactions_count
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereMfaSecret($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereObjectguid($value)
|
||||||
*/
|
*/
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user