> ## Documentation Index
> Fetch the complete documentation index at: https://docs.younegotiate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Password

> Sarah from ABC Collections knows her current password but wants to change it.

## Real-World Example

Sarah from ABC Collections knows her current password but wants to change it. She opens Change Password, enters the current password, enters a new password, confirms it, and saves.

The system should reject the change if Sarah enters the wrong current password or if the new password does not meet the rules. After a successful change, Sarah should use the new password the next time she logs in.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["User opens Change Password"] --> B["User enters current password"]
    B --> C["User enters and confirms new password"]
    C --> D{"Is current password correct?"}
    D -->|No| E["Show validation error"]
    D -->|Yes| F{"Does new password pass rules?"}
    F -->|No| E
    F -->|Yes| G["Password is updated"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A actor;
    class B,C system;
    class D,F decision;
    class E risk;
    class G outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should require the user's current password.
* It should require a new password that is different from the current password.
* The new password should follow the system's password rules.
* The new password and confirmation should match.
* After a successful change, the form should reset and the user should continue normally.

## How It Should Not Work

* It should not change the password when the current password is wrong.
* It should not accept a new password that matches the current password.
* It should not accept a weak or unconfirmed new password.
* It should not change another user's password from this page.

## Developer Notes

* Changing password requires the current password and a new confirmed password that passes password rules.
* This page should only update the logged-in creditor user, never another user.

## Related App Areas

* `app/Livewire/Creditor/ChangePasswordPage.php`
* `app/Livewire/Creditor/Forms/ChangePasswordForm.php`
