Created
May 13, 2014 23:12
-
-
Save shawnr/bf17930340ed30ea2464 to your computer and use it in GitHub Desktop.
Quick script parts to determine if a Canvas LMS user ID is in a list of IDs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var id_list = [ | |
1234, | |
4321 | |
]; | |
var id_string = id_list.join(' '); | |
if (id_string.indexOf(ENV.current_user_id) > -1) { | |
console.log('user found in admins'); | |
} else { | |
console.log('user not found in admins'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment