Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/8812
James Cole3d410556ef08
diff --git a/app/Console/Commands/Integrity/CreateGroupMemberships.php b/app/Console/Commands/Integrity/CreateGroupMemberships.phpindex b5127c2791..0927f1b7cb 100644--- a/app/Console/Commands/Integrity/CreateGroupMemberships.php+++ b/app/Console/Commands/Integrity/CreateGroupMemberships.php@@ -80,7 +80,7 @@ class CreateGroupMemberships extends Command// check if membership exists$userGroup = UserGroup::where('title', $user->email)->first();if (null === $userGroup) {- $userGroup = UserGroup::create(['title' => $user->email, 'default_administration' => true]);+ $userGroup = UserGroup::create(['title' => $user->email]);}$userRole = UserRole::where('title', UserRoleEnum::OWNER->value)->first();diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.phpindex e24f8c3df5..34cf18f84e 100644--- a/app/Models/UserGroup.php+++ b/app/Models/UserGroup.php@@ -98,7 +98,7 @@ class UserGroup extends Model{use ReturnsIntegerIdTrait;- protected $fillable = ['title', 'default_administration'];+ protected $fillable = ['title'];/*** Route binder. Converts the key in the URL to the specified object (or throw 404).diff --git a/app/Support/Authentication/RemoteUserProvider.php b/app/Support/Authentication/RemoteUserProvider.phpindex 9d4443f0c8..a218dd5bfe 100644--- a/app/Support/Authentication/RemoteUserProvider.php+++ b/app/Support/Authentication/RemoteUserProvider.php@@ -80,9 +80,10 @@ class RemoteUserProvider implements UserProvider$roleObject = Role::where('name', 'owner')->first();$user->roles()->attach($roleObject);}- // make sure the user gets an administration as well.- CreateGroupMemberships::createGroupMembership($user);}+ // make sure the user gets an administration as well.+ CreateGroupMemberships::createGroupMembership($user);+app('log')->debug(sprintf('Going to return user #%d (%s)', $user->id, $user->email));return $user;