Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 16, 20168 yr Hello, I am trying to retrieve members information with the IPS Class \IPS\Member::loggedIn() After dumping the output, I can't see members group name. Is there a way to retrieve it?
December 16, 20168 yr \IPS\Member::loggedIn()->groupName; // Gives you the formatted group name \IPS\Member::loggedIn()->language()->addToStack( "core_group_" . \IPS\Member::loggedIn()->member_group_id ); // Gives you the raw group name
December 16, 20168 yr Author Unofortunately not. echo \IPS\Member::loggedIn()->groupName; displays : 9069d34ad217af2adb462b69812d9178 And you can trust me, this not the name of the group.
December 17, 20168 yr Are you doing this in a template, or outside the suite? $groupName = \IPS\Member::loggedIn()->groupName; \IPS\Member::loggedIn()->language()->parseOutputForDisplay( $groupName ); echo $groupName;
December 17, 20168 yr Are you doing this in a template, or outside the suite? $groupName = \IPS\Member::loggedIn()->groupName; \IPS\Member::loggedIn()->language()->parseOutputForDisplay( $groupName ); echo $groupName;
December 17, 20168 yr Author Hi Martin, It is outside the suite, and the code you provided works perfectly well! Thank you very much.
Archived
This topic is now archived and is closed to further replies.