Fix: show correct status label for all user types in user_information#8676
Open
addow wants to merge 1 commit into
Open
Fix: show correct status label for all user types in user_information#8676addow wants to merge 1 commit into
addow wants to merge 1 commit into
Conversation
c5ec250 to
4d5e9b8
Compare
…rmation The status display used a binary check (status == 1 → Trainer, else → Learner), causing DRH, Session admin, Student boss and Invitee users to incorrectly display as Learner. Now uses api_get_status_langvars() which covers all status values (COURSEMANAGER, SESSIONADMIN, DRH, STUDENT, ANONYMOUS, STUDENT_BOSS, INVITEE).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The status field on
/main/admin/user_information.phpused a binary check:This caused users with status
DRH(4),SESSIONADMIN(3),STUDENT_BOSS(17) andINVITEE(20) to incorrectly display as Learner, even when they held HR manager, session admin, or invitee roles.The fix replaces the binary check with
api_get_status_langvars(), which already provides the complete mapping for all status values and is used in other parts of the codebase.Status values covered
COURSEMANAGERSESSIONADMINDRHSTUDENTANONYMOUSSTUDENT_BOSSINVITEETest plan
/main/admin/user_information.php?user_id=<id>for users with each status type