When a user submits a reset password form, which UX is preferred?

1. A temporary password is created for them to use. It's emailed to them. They log in and then a permanent change password form is shown.
2. A link is emailed to the user that takes them directly to a change password form. The link has a unique id in the URL (which also expires).

Note: in neither situation is the actual password changed until the user completes the steps in the password reset email.