The doc comment in the hook interface and the original wiki page list UserIdentity as the type for the $user parameter. Later on the wiki page, the type was changed to User.
To do:
- Figure out which type is correct
- Correct the interface (and Use statement) or wiki page as necessary
References: