cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-535817%22%20slang%3D%22en-US%22%3EHow%20to%20get%20user%20name%20rank%20color%20display%20information%20via%20APIs%3F%3F%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-535817%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20select%20different%20colors%20to%20display%20user's%20name%20for%20the%20different%20ranks%20a%20user%20has.%20I%20have%20a%20custom%20author%20display%20component%20and%20I%20want%20to%20be%20able%20to%20bring%20this%20functionality%20into%20it%20but%20have%20no%20idea%20how%20to%20find%20that%20information%20in%20a%20way%20that%20I%20can%20use.%20Help!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-536802%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20user%20name%20rank%20color%20display%20information%20via%20APIs%3F%3F%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-536802%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F85704%22%20target%3D%22_blank%22%3E%40minilpiyukson21%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20use%20community%20API%20v2%20to%20find%20all%20the%20data%20related%20to%20ranks%20like%20color%2C%20icons%2C%20bold%20font%2C%20etc%20to%20build%20your%20own%20custom%20component%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-php%22%3E%3CCODE%3ESELECT%20rank%20FROM%20users%20WHERE%20id%20%3D%20'8'%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EBut%20I%20would%20recommend%20using%20a%20non-contract%20component%20in%20your%20custom%20component%20to%20fetch%20user%20details%20if%20it%20fits%20well%20in%20your%20requirement.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26lt%3B%40component%20id%3D%22common.widget.user-name%22%20user%3D%22conv%3A5%22%20%2F%26gt%3B%0Aor%0A%26lt%3B%40component%20id%3D%22common.widget.user-name%22%20user%3D%22conv%3Ausername%22%20%2F%26gt%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-535824%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20user%20name%20rank%20color%20display%20information%20via%20APIs%3F%3F%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-535824%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F85704%22%20target%3D%22_blank%22%3E%40minilpiyukson21%3C%2FA%3E%26nbsp%3B-%20Below%20link%20will%20be%20helpful%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2FKhoros-Community-Discussions%2FHow-to-get-user-name-rank-color-display-information-via-APIs%2Fm-p%2F534549%23M7827%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.khoros.com%2Ft5%2FKhoros-Community-Discussions%2FHow-to-get-user-name-rank-color-display-information-via-APIs%2Fm-p%2F534549%23M7827%3C%2FA%3E%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Commentator

How to get user name rank color display information via APIs????

You can select different colors to display user's name for the different ranks a user has. I have a custom author display component and I want to be able to bring this functionality into it but have no idea how to find that information in a way that I can use. Help! 

2 Replies 2
Highlighted
Honored Contributor
Highlighted
Valued Contributor

@minilpiyukson21 

You can use community API v2 to find all the data related to ranks like color, icons, bold font, etc to build your own custom component

 

SELECT rank FROM users WHERE id = '8'

 


But I would recommend using a non-contract component in your custom component to fetch user details if it fits well in your requirement.

 

<@component id="common.widget.user-name" user="conv:5" />
or
<@component id="common.widget.user-name" user="conv:username" />

 





Happy to Help !!! give kudos if you like my solution & mark it as solved if it resolves your issue