]> BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/DeleteUsers.php
Actually fixed the BaseURL this time 🤦
[bookstack] / app / Console / Commands / DeleteUsers.php
index c287dd55eaf32ab458ba4af1c8b9a3f926bb108f..8829d39923a58b4911de1fde0d57ccfd65adabc7 100644 (file)
@@ -39,11 +39,11 @@ class DeleteUsers extends Command{
         $numDeleted = 0;
         if (strtolower(trim($confirm)) === 'yes')
         {
-            $totalUsers = User::count();
+            $totalUsers = $this->user->count();
             $users = $this->user->where('system_name', '=', null)->with('roles')->get();
             foreach ($users as $user)
             {
-                if ($user->hasRole('admin'))
+                if ($user->hasSystemRole('admin'))
                 {
                     // don't delete users with "admin" role
                     continue;