watchdog('user','User %name used one-time login link at time %timestamp.',array('%name'=>$account->name,'%timestamp'=>$timestamp));
// Set the new user.
$user=$account;
// user_login_finalize() also updates the login timestamp of the
// user, which invalidates further use of the one-time login link.
user_login_finalize();
watchdog('user','User %name used one-time login link at time %timestamp.',array('%name'=>$account->name,'%timestamp'=>$timestamp));
drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please change your password.'));
// Let the user's password be changed without the current password check.