namespace BookStack\Console\Commands;
+use BookStack\Auth\Role;
use BookStack\Auth\UserRepo;
use BookStack\Exceptions\NotFoundException;
use Illuminate\Console\Command;
}
$user = $this->userRepo->createWithoutActivity($validator->validated());
- $this->userRepo->attachSystemRole($user, 'admin');
+ $user->attachRole(Role::getSystemRole('admin'));
$user->email_confirmed = true;
$user->save();