mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
This commit is contained in:
@@ -80,7 +80,7 @@ class CreateGroupMemberships extends Command
|
|||||||
// check if membership exists
|
// check if membership exists
|
||||||
$userGroup = UserGroup::where('title', $user->email)->first();
|
$userGroup = UserGroup::where('title', $user->email)->first();
|
||||||
if (null === $userGroup) {
|
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();
|
$userRole = UserRole::where('title', UserRoleEnum::OWNER->value)->first();
|
||||||
|
@@ -98,7 +98,7 @@ class UserGroup extends Model
|
|||||||
{
|
{
|
||||||
use ReturnsIntegerIdTrait;
|
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).
|
* 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();
|
$roleObject = Role::where('name', 'owner')->first();
|
||||||
$user->roles()->attach($roleObject);
|
$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));
|
app('log')->debug(sprintf('Going to return user #%d (%s)', $user->id, $user->email));
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
|
Reference in New Issue
Block a user