views:

314

answers:

2

I have Drupal 6 installed with Ubercart 2.0.

When an anonymous user purchases a product from Ubercart, a new account is automatically created for them and they are emailed a link to download the file associated with the product.

The link doesn't work unless they are logged in, which does not happen for them automatically.

I need one of the following two things: Either the user should automatically be logged in, or the file download link should work even for anonymous users. I am not sure how to go about doing either of these, so I would appreciate any guidance.

A: 

It turns out there's a checkbox in the Ubercart settings to log the user in after checkout.

Fragsworth
A: 

You seem happy with the solution you found yourself (and that I was going to mention, had you not answered while I was typing this!), however - if you want to solve the problem of the not-working links from e-mails, you could look into installing the Login Ticket module.

This module provide an API for you to generate one-time login tokens (URL that makes you login automatically), you could write a small module (or function in an existing module) that would alter the mail sent by ubercart adding (or substituting to the existing link) the token.

You should then also implement hook_user() in order to redirect the user to the download link upon use of the token.

HTH!

mac

related questions