Verifies that the given token is valid and matches the given user and email
The database to use
The user to verify the token for
The token to verify
The type of the token
Optional
The email to associate with the token
The email associated with the token if it is valid, otherwise undefined
Verifies that the given token is valid and matches the given user and email