]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/UserTokenService.php
Implement the renderPages parameter
[bookstack] / app / Auth / Access / UserTokenService.php
index 34f3b285110aa1aa799ef56492f799949e3f5893..a1defbf62d439a4bdacdef971271db1dde532afd 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;
     }
@@ -130,5 +131,4 @@ class UserTokenService
         return Carbon::now()->subHours($this->expiryTime)
             ->gt(new Carbon($tokenEntry->created_at));
     }
-
-}
\ No newline at end of file
+}