inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 7, 2016 10:29:12 GMT -8
Hello Brian or Scott I want to limit access to everyone except staff and members selected by either username or user id's. Thus far, these two codes does not work. I'm sure it's a simple fix, but can't seem to figure it out. Any assistance is greatly appreciated.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jan 7, 2016 11:40:56 GMT -8
Hi, aRMY83. If statements cannot compare against multiple values using commas. You need to repeat the if statement to compare to a new value.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 7, 2016 11:55:46 GMT -8
Thanks Brian and if I may ask, then I can allow more id's like this? if(pb.data('user').id != 1 && pb.data('user').id != 2 && pb.data('user').id != 3) { Just out of curiosity, where can one find this type of information within ProBoards?
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Jan 7, 2016 12:02:14 GMT -8
That's correct. The syntax for Javascript if statements can be found on any site that teaches Javascript (such as Mozilla Developer Network) while the unique variables originating from us are found in our Javascript API.
|
|