Preprocess the `$userInfo` array to turn it into a dict. It makes for more readable code (and as a bonus, it is faster too)