getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

View don't update on username change with hook #4477

Closed enzo-martellucci closed 2 years ago

enzo-martellucci commented 2 years ago

Description

When the username is changed through a Kirby hooks, it is not changed instantly on the page, we need to refresh page.

Expected behavior

The username to change instantly.

Screenshots

image Example of hook above.

To reproduce

  1. Change programmaticaly the username in the function of 'user.update:before' hooks.
  2. Create a field in the user account.
  3. Modify the fields and save (doesn't update)
  4. Refresh page (update)

Your setup

Kirby Version

3.6.6

Console output

Your system (please complete the following information)

Additional context

distantnative commented 2 years ago

Changes within hooks are not reflected directly in the Panel. So this is not a bug, but I can understand this is a feature you would like to see. Please open an idea over here for this: https://kirby.nolt.io