Fixed the getUserById to use array of results