octobercms/october · error · ApplicationException

Current password does not match. Please try again!

Error message

Current password does not match. Please try again!

What it means

Error "Current password does not match. Please try again!" thrown in octobercms/october.

Source

Thrown at modules/backend/controllers/AuthGates.php:68

            'current_password' => 'required|between:4,255',
            'password' => 'required|between:4,255|confirmed|different:current_password',
            'password_confirmation' => 'required_with:password|between:4,255'
        ];

        $validation = Validator::make(post(), $rules, [], [
            'current_password' => __("Current Password"),
            'password' => __("New Password"),
            'password_confirmation' => __("Confirm Password"),
        ]);

        if ($validation->fails()) {
            throw new ValidationException($validation);
        }

        $user = $this->user;

        if (!$user || !$user->checkPassword(post('current_password'))) {
            throw new ApplicationException(__("Current password does not match. Please try again!"));
        }

        // Validate password against policy
        $user->validatePasswordPolicy(post('password'));

        // Reset the user password and clear any code used to reset the password
        $user->password = post('password');
        $user->password_changed_at = $user->freshTimestamp();
        $user->is_password_expired = false;
        $user->reset_password_code = null;
        $user->forceSave();

        // Clear throttles
        BackendAuth::clearThrottleForUserId($user->id);

        Flash::success(__("Password has been reset. You may now sign in."));

        return Backend::redirect('backend/auth/signin');

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/backend/controllers/AuthGates.php:68 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/ad4a36190671e4ad. Report an issue: GitHub.