Remove $_SESSION['cirs_user'], retrieve fullname from Mitarbeiter profile, and remove manual profile editing - #149
Conversation
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
|
@copilot Okay jetzt kann die Seite zum bearbeiten des eigenen Profils entfernt werden. Auch alle Punkte die auf sie verweisen. |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Done! Removed profil.php and all references in commit 6522b75:
Users can no longer manually edit their fullname - it's now automatically retrieved from their Mitarbeiter profile via Discord ID. The system works with the "System Admin" fallback for users without linked profiles. |
|
@copilot Okay. Der Standardwerte Sollte nun anstatt "System Admin" "Admin #ID" mit der ID des Admin users sein. |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Done! Changed the default fallback in commit a5b3eaf: Instead of showing "System Admin", the system now displays "Admin #[UserID]" where the ID is taken from For example:
This provides better identification of which admin user performed an action, even when they don't have a linked Mitarbeiter profile. |
|
@copilot In the document generation getting the users name seems to not work correctly anymore |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Fixed in commit a6410c3! The issue was that document generation queries were only looking at Updated 15 files to use
Document generation now correctly retrieves user names from Mitarbeiter profiles first, falling back to intra_users only if needed. |
Remove
$_SESSION['cirs_user']from the system and replace with automatic data retrieval from Mitarbeiter profile via Discord IDCompleted Implementation:
$_SESSION['cirs_user'](19 occurrences)$_SESSION['cirs_user']assignment (2 occurrences removed)$_SESSION['cirs_user']with UserHelper function calls (13 files modified)$_SESSION['cirs_user']references removed (0 remaining)Key Changes:
UserHelperclass with 5 methods for dynamic fullname retrievalCOALESCE(m.fullname, u.fullname)pattern:Benefits:
✓ Single source of truth (Mitarbeiter profile)
✓ Automatic updates when profile changes
✓ Better UX with "Admin #ID" fallback that identifies the specific user
✓ No manual fullname editing - data integrity maintained
✓ Works in all scenarios (new system, support mode, missing profile)
✓ Document generation now correctly retrieves user names from Mitarbeiter profiles
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.