Notifications
Clear all

[Closed] Multiple Custom Badges/User Stats

13 Posts
3 Users
3 Reactions
6,740 Views
Robert
Posts: 10587
Admin
(@robert)
Support Team
Joined: 9 years ago

$member is current post user ID in the loop, it's not current logged-in user ID. You should use $member['userid'] not $member. $member is an array.

 

 

Posts: 9
Topic starter
(@thestephaniejns)
Active Member
Joined: 8 years ago

I've tried using $member['userid'] but it breaks the forum... Probably because it's being used within a shortcode, as I mentioned above. And I do need the current post user ID in the loop, but $member is not pulling that—it's pulling the current logged in user ID. Please help—I don't know if there's another array or set of code I can use but I have to get this system functional for my client this week so they can get beta testers in.

Thank you!

Robert
Posts: 10587
Admin
(@robert)
Support Team
Joined: 9 years ago

Hi thestephaniejns,

I'm sorry but we don't provide codding and customization support. I'd only recommend to output all Global variables and check what variable is available, then use global PHP operator to access in your shortcode function. For example you can try :

function myfunc(){
global $member;
.... then use $member['userid'....]
}
Page 3 / 3