use BookStack\Exceptions\UserTokenNotFoundException;
use Carbon\Carbon;
use Illuminate\Database\Connection as Database;
+use Illuminate\Support\Str;
use stdClass;
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;
}
return Carbon::now()->subHours($this->expiryTime)
->gt(new Carbon($tokenEntry->created_at));
}
-
-}
\ No newline at end of file
+}