Problem/Motivation

After logging in, a user lands on their profile page and sees little more than their name and "Member for". They cannot see their own account details: the email address it is registered with, the time zone dates are shown in, whether the account is active, when it was created or when they last logged in.

Core does not let Views show most of these to the account owner (email, time zone, status and last login are limited to user administrators), so this needs a small rendering layer rather than a view.

Steps to reproduce

  1. Install Varbase 11.0.x.
  2. Log in as a user with no extra role and visit /user.
  3. Only the picture and "Member for" show.

Environment: Drupal 11.4.9, Varbase 11.0.x-dev, PHP 8.4, MariaDB 11.8 (DDEV).

Before:
User profile page with only the picture and Member for

After the change below, with the matching Vartheme BS5 component:
User profile page with the Profile details card

Proposed resolution

Add a varbase_user_profile_details ECA model to the recipe:

  • An ECA extra field, "Profile details", on the user display. It renders only for the account owner, varies by user, and can be moved or hidden on Manage display.
  • An ECA block, "User profile details", for the logged-in user. Drupal Canvas offers it as a block component, for an account or dashboard page.
  • Both render the active theme's user-profile-details SDC with: username, full name (only when the site has a field_full_name, or field_first_name and field_last_name), email, time zone, account status, account created, member for, last login, the user picture, and Edit profile / Change password / Log out actions. A theme without the component renders nothing.
  • Only Drupal's default user fields are used: no field is added.
  • The recipe installs eca, eca_base, eca_render, eca_user and modeler_api, and requires drupal/eca and drupal/modeler_api.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Reviewed by a human
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release varbase_users_base-1.0.1

User interface changes

  • A Profile details card on the user's own profile page.
  • A "User profile details" block (and Canvas block component).

API changes

  • N/A

Data model changes

  • New config: eca.eca.varbase_user_profile_details.

Release notes snippet

  • Show users their own account details on their profile page, with an ECA model and a Canvas-ready block.

AI-Generated: Yes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 51d32471 on 1.0.x
    feat: #3630123 Show users their own account details on their profile...
rajab natshah’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Fixed » Needs review

Merged in MR !14; reviewed and merged by the maintainer.

rajab natshah’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed by the maintainer. The fresh-install functional tests passed on Varbase 11.0.x.

rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
Issue tags: +varbase_users_base-1.0.1

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue summary: View changes