Skip to content

Commit

Permalink
Merge pull request #4 from tomatophp/hotfix
Browse files Browse the repository at this point in the history
Fix password plain text
  • Loading branch information
3x1io committed Oct 9, 2023
2 parents 03c143a + ce77690 commit 4cbe52f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function create(): \Illuminate\Contracts\Foundation\Application|\Illumina
*/
public function store(UserStoreRequest $request): RedirectResponse
{
$request->merge([
"password" => bcrypt($request->get('password'))
]);

$response = Tomato::store(
request: $request,
model: \App\Models\User::class,
Expand Down
2 changes: 0 additions & 2 deletions src/Http/Requests/User/UserStoreRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public function authorize()
*/
public function rules()
{
$this->password = bcrypt($this->password);

return [
'name' => 'required|max:255|string',
'email' => 'required|max:255|string|email|unique:users,email',
Expand Down

0 comments on commit 4cbe52f

Please sign in to comment.