inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 24, 2016 21:29:35 GMT -8
I know you can get the current user name with
var memberName = proboards.data('user').name;
You can get the user ID the same way. What if I want to get the user name of user 4 though? Can I get the proboards.data information of users who aren't the current user?
Thanks and Merry Christmas.
|
|
inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 25, 2016 1:18:57 GMT -8
Darnit. I had a dream I checked my phone and read some answer from a mod about how to do it. Stupid brain.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 27, 2016 18:06:23 GMT -8
If you have the user's numeric ID and the user in question resides somewhere on the page then you can scrub the HTML something like this: var user_id=217348; $(".user-link.user-"+user_id).attr("title").substr(1); //username pb.text.escape_html($(".user-link.user-"+user_id).html()); //name
It's a long standing "wishlist" to be able to grab pertinent user info given only a numeric ID and it has been suggested that one could use the member select API to accomplish this in a roundabout way but that also requires user interaction and is not accessible to all users. The current method is to store that information yourself for later retrieval.
|
|