Changing A Users Details

Based off the advanced template what would be the best way to allow a logged in user to change their details?

Should I update the User model stored in identity or create a new User model instance based off the logged in users id?

Hmmm, nice question.

The thing is, ‘identity’ can return anything, not the user model only.

I wonder if there’s a usecase when User model exists but identity is something else.

Depends on your app need and design. Typically, you may always want to query the latest data from the database before allowing user to edit (for managing multiple logins by same user etc.).

If you have autoLogin set and identity is the User model it will query the user table on each request so identity is always up to date.

Correct! And that’s what you may want to decide in your app design? Would you want the above setting to be not set to query db on every request? Would you want the database user record to be queried only on specific scenarios like profile editing / etc?

In your case, your source for data can be either.