mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Clean up code.
This commit is contained in:
@@ -68,8 +68,8 @@ trait UserGroupTrait
|
||||
public function setUser(Authenticatable | User | null $user): void
|
||||
{
|
||||
if ($user instanceof User) {
|
||||
$this->user = $user;
|
||||
if(null === $user->userGroup) {
|
||||
$this->user = $user;
|
||||
if (null === $user->userGroup) {
|
||||
throw new FireflyException(sprintf('User #%d has no user group.', $user->id));
|
||||
}
|
||||
$this->userGroup = $user->userGroup;
|
||||
|
Reference in New Issue
Block a user