]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/UserTokenService.php
Removed old str_random functions from seeders
[bookstack] / app / Auth / Access / UserTokenService.php
index 34f3b285110aa1aa799ef56492f799949e3f5893..09a2f761b8f31ac73ae269ca9c6c7f21cf34d59b 100644 (file)
@@ -5,6 +5,7 @@ use BookStack\Exceptions\UserTokenExpiredException;
 use BookStack\Exceptions\UserTokenNotFoundException;
 use Carbon\Carbon;
 use Illuminate\Database\Connection as Database;
+use Illuminate\Support\Str;
 use stdClass;
 
 class UserTokenService
@@ -73,9 +74,9 @@ class UserTokenService
      */
     protected function generateToken() : string
     {
-        $token = str_random(24);
+        $token = Str::random(24);
         while ($this->tokenExists($token)) {
-            $token = str_random(25);
+            $token = Str::random(25);
         }
         return $token;
     }