X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/42d8548960dc6a59b906ad0794746b22cdfde423..refs/pull/1641/head:/app/Http/Controllers/UserController.php diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index c9d2560ba..156256cb9 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -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'); }