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
- Install Varbase 11.0.x.
- Log in as a user with no extra role and visit
/user. - 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:
After the change below, with the matching Vartheme BS5 component:
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-detailsSDC with: username, full name (only when the site has afield_full_name, orfield_first_nameandfield_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_userandmodeler_api, and requiresdrupal/ecaanddrupal/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
| Comment | File | Size | Author |
|---|---|---|---|
| varbase-11.0.x-after.png | 104.33 KB | rajab natshah | |
| varbase-11.0.x-before.png | 78.91 KB | rajab natshah |
Issue fork varbase_users_base-3630123
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
Comment #4
rajab natshahComment #6
rajab natshahMerged in MR !14; reviewed and merged by the maintainer.
Comment #7
rajab natshahReviewed by the maintainer. The fresh-install functional tests passed on Varbase 11.0.x.
Comment #8
rajab natshah✅ Released varbase_users_base-1.0.1
Comment #10
rajab natshah