inherit
203080
0
Mar 17, 2014 14:50:56 GMT -8
baratheon
43
December 2013
baratheon
|
Post by baratheon on Dec 22, 2013 19:45:58 GMT -8
I am developing a plugin, and I need to grab the current member's username, or check whether a user is logged in. Any ideas?
Thanks.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Dec 22, 2013 22:34:19 GMT -8
var user = pb.data('user'); alert(user.is_logged_in ); alert(user.name); NOTE: is_logged_in will be 1 if they are logged in and 0 if they are not. (same with is_staff) These are the parameters held in the user variable and an example. "is_logged_in": 1, "theme_id": "3", "url": "/user/1", "name": "Jordan", "id": "1", "is_staff": "1"
|
|
#00AF33
Bark Different.
102833
0
1
Feb 12, 2023 16:57:46 GMT -8
RedBassett
I'm a Marxist/Lennonist of the Groucho/John variety.
15,405
April 2007
applecomputer
RedBassett's Mini-Profile
|
Post by RedBassett on Dec 23, 2013 4:04:05 GMT -8
You can get a full user variable by opening the Javascript console and entering "proboards.dataHash.user".
|
|
inherit
203080
0
Mar 17, 2014 14:50:56 GMT -8
baratheon
43
December 2013
baratheon
|
Post by baratheon on Dec 23, 2013 9:50:29 GMT -8
Thanks guys. It works fine.
|
|