Skip to content

Commit

Permalink
Fix: changing twill user password in admin doesn't use the correct ha…
Browse files Browse the repository at this point in the history
…shing algorithm
  • Loading branch information
Tofandel committed May 10, 2024
1 parent 8611299 commit a4c61c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Repositories/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Illuminate\Contracts\Auth\Factory as AuthFactory;
use Illuminate\Database\DatabaseManager as DB;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Hash;

class UserRepository extends ModuleRepository
{
Expand Down Expand Up @@ -128,7 +129,7 @@ public function afterSave(TwillModelContract|user $user, array $fields): void
$this->sendWelcomeEmail($user);

if (!empty($fields['reset_password']) && !empty($fields['new_password'])) {
$user->password = bcrypt($fields['new_password']);
$user->password = Hash::make($fields['new_password']);

if (!$user->isActivated()) {
$user->registered_at = Carbon::now();
Expand Down

0 comments on commit a4c61c5

Please sign in to comment.