mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 08:56:39 -06:00
This commit is contained in:
parent
f15ca1d0a1
commit
3d410556ef
@ -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();
|
||||
|
@ -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).
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user