mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
chore: code cleanup.
This commit is contained in:
@@ -85,6 +85,7 @@ class UpdateGroupInformation extends Command
|
||||
$group = $user->userGroup;
|
||||
if (null === $group) {
|
||||
$this->warn(sprintf('User "%s" has no group.', $user->email));
|
||||
|
||||
return;
|
||||
}
|
||||
$set = [
|
||||
@@ -112,6 +113,7 @@ class UpdateGroupInformation extends Command
|
||||
* @param User $user
|
||||
* @param UserGroup $group
|
||||
* @param string $className
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function updateGroupInfoForObject(User $user, UserGroup $group, string $className): void
|
||||
@@ -120,6 +122,7 @@ class UpdateGroupInformation extends Command
|
||||
$result = $className::where('user_id', $user->id)->where('user_group_id', null)->update(['user_group_id' => $group->id]);
|
||||
} catch (QueryException $e) {
|
||||
$this->error(sprintf('Could not update group information for "%s" because of error "%s"', $className, $e->getMessage()));
|
||||
|
||||
return;
|
||||
}
|
||||
if (0 !== $result) {
|
||||
|
Reference in New Issue
Block a user