|This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. For information on the feature that replaced this one, see Username (block).|
|Introduced in||2.0 alpha|
|Removed in||2.0 beta|
Each user had a different ID according to when they viewed the project (the first viewer was 1, the second was 2, and so forth). Users who were not logged in to an account were assigned the user ID 0. User ID's remained constant for the same project. The user ID block itself was a reporter block, and belonged to the Sensing category.
- Main article: List of Block Workarounds
One hypothetical workaround for this block is as follows; however, it cannot be practically implemented, since it requires cloud lists, which are a rejected feature.
when [timer v] > (-1) //before the project loads if <(username) = > then set [user id v] to  //empty username means an anonymous user; their user ID is zero else set [user id v] to (item # of (username) in [☁ users v]) if <(user id :: variables) = > then //for a new user add (username) to [☁ users v] set [user id v] to (length of [☁ users v]) //item # is slow end end
Examples of its potential uses:
say (join [Your User ID is ] (user id :: variables))
if <(user id :: variables) = [insert User ID number you want here]> then ... end
Change to Username Block
During the Scratch 2.0 Beta, in early April 2013, the Scratch Team changed the user id block to the username block, which gives an output of the user's username. This way with high score lists it's easier to detect who set the high score. Now, since it was deleted from Scratch, it is obsolete, so it looks red. If you click it, then all it will say now is NULL instead of a number.
- Za-Chary. (10/3/2019). "[T]he Scratch Team will not be adding an easy official way to make cloud lists." topic:343602