Skip to content

[BUG REPORT] Cannot edit user password from admin panel. #992

@sharazy

Description

@sharazy

Describe the bug
Editing user's setting (username/roles/password) returns HTTP 500

To Reproduce
Go to /admin/ and left pane > Settings > Manage Users > Edit particular user (in my case, myself) > Available options only username, role, password > Click Save

Expected behavior
Updated user info.

Screenshots/Errors
php_errors.log

> [15-Nov-2025 14:41:08 Asia/Kuala_Lumpur] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function update_user(), 3 passed in D:\Server\Laragon\sites\domain.tld\notes\public\system\htmly.php on line 2924 and exactly 4 expected in D:\Server\Laragon\sites\domain.tld\notes\public\system\admin\admin.php:20
> Stack trace:
> #0 D:\Server\Laragon\sites\domain.tld\notes\public\system\htmly.php(2924): update_user()
> #1 D:\Server\Laragon\sites\domain.tld\notes\public\system\includes\dispatch.php(644): {closure:D:\Server\Laragon\sites\domain.tld\notes\public\system\htmly.php:2906}()
> #2 D:\Server\Laragon\sites\domain.tld\notes\public\system\includes\dispatch.php(778): route()
> #3 D:\Server\Laragon\sites\domain.tld\notes\public\system\htmly.php(5800): dispatch()
> #4 D:\Server\Laragon\sites\domain.tld\notes\public\index.php(6): require('...')
> #5 {main}
>   thrown in D:\Server\Laragon\sites\domain.tld\notes\public\system\admin\admin.php on line 20

HTMLy Version
HTMLy 3.1.1

Server Info (please complete the following information):

  • OS: Windows 10
  • Webserver Laragon 6 Stack (Apache/nginx/MariaDB
  • PHP 8.4.14-nts

Additional context
Upon checking, I believe admin.php:20 update_user() expecting $mfa_secret value.
function update_user($userName, $password, $role, $mfa_secret)

Given htmly.php:2924 only passing 3 parameters.
update_user($username, $new_password, $user_role);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions