rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules\Password;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Throwable;
class Index extends Component
{
@@ -41,9 +42,11 @@ class Index extends Component
]);
$this->dispatch('success', 'Profile updated.');
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function resetPassword()
@@ -56,12 +59,12 @@ class Index extends Component
if (! Hash::check($this->current_password, auth()->user()->password)) {
$this->dispatch('error', 'Current password is incorrect.');
return;
return null;
}
if ($this->new_password !== $this->new_password_confirmation) {
$this->dispatch('error', 'The two new passwords does not match.');
return;
return null;
}
auth()->user()->update([
'password' => Hash::make($this->new_password),
@@ -70,9 +73,11 @@ class Index extends Component
$this->current_password = '';
$this->new_password = '';
$this->new_password_confirmation = '';
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function render()