Capter 6: userManager appear suddenly

While reading the book, it tells me to write code under userManager.
But at that point the userManager is nowhere to be found.
I read Chapter 6 again just in case.
But the userManager doesn’t appear anywhere.
Where the hell did this code come from?

Chapter 6, page 136.