# CC Soccer D11 - Session Handoff (Archived)
**Date:** March 1, 2026
**Session:** My Account hub — login redirect, menu, Actions box
**Branch:** `main`

## Last Updated
2026-03-01

## Current State
- All core functionality working
- My Account hub page live at `/my-account`
- Login redirects to `/my-account` after successful login
- Account menu "My Account" link points to hub (overrides core `user.page`)
- Schema version: 9055 (no changes this session)

---

## What Was Done This Session

### My Account Hub — Login Redirect Fix
- `hook_user_login` was using `exit()` after sending redirect response, causing access denied
- Fixed to use `$request->query->set('destination', '/my-account')` — lets Drupal handle redirect after session is fully written

### My Account Hub — Menu Link Fix
- Core `user.page` link always wins over custom menu links (weight -10)
- Override added in `hook_menu_links_discovered_alter` — redirects `user.page` route to `ccsoccer.my_account` and retitles it "My Account"
- Our duplicate custom menu link entry removed from `ccsoccer.links.menu.yml`

### My Account Hub — Actions Box
- Replaced centered register CTA with an "Actions" box containing both the invite banner and Register button
- Invite banner now sits inside the box (lighter styling, no double border)
- Register button uses `button--primary` with inline pill styling to match nav Register button
- Removed open-registrations note (open season listing was noisy, not needed)
- Removed unused `$season_storage` and `$tournament_storage` variables from `myAccount()`

---

## Files Modified This Session
- `web/modules/custom/ccsoccer/ccsoccer.module` — `hook_user_login` redirect fix; `hook_menu_links_discovered_alter` My Account override
- `web/modules/custom/ccsoccer/src/Controller/ContentController.php` — Actions box HTML, removed open-season logic
- `web/modules/custom/ccsoccer/css/content-pages.css` — Actions box styles replacing register CTA styles
