]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/UserController.php
Removed old str_random functions from seeders
[bookstack] / app / Http / Controllers / UserController.php
index c9d2560ba0fff4cf9cb4360579ad71c3afd1c591..156256cb94fd4d28ae0aeabbd864baa63f3e4ded 100644 (file)
@@ -8,6 +8,7 @@ use BookStack\Exceptions\UserUpdateException;
 use BookStack\Uploads\ImageRepo;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
+use Illuminate\Support\Str;
 
 class UserController extends Controller
 {
@@ -92,7 +93,7 @@ class UserController extends Controller
         $user = $this->user->fill($request->all());
 
         if ($authMethod === 'standard') {
-            $user->password = bcrypt($request->get('password', str_random(32)));
+            $user->password = bcrypt($request->get('password', Str::random(32)));
         } elseif ($authMethod === 'ldap') {
             $user->external_auth_id = $request->get('external_auth_id');
         }