Whenever a customer puts items into their cart and logs out their email disappears until they log back in. Is there a way to view the email and info in commerce of the person when they log out?

1 Answer 1


You mean on the front end? User data is cleared when a person logs out....that would be the expected behaviour surely? And for privacy reasons, the info for that customer should not be available until they log back in (think about e.g. use of a shared computer).

I think I must be misunderstanding the question, but as I understand it, the answer is no, and the behaviour of the data being clear is expected (and correct).

(Note the cart itself is not cleared on log out with Commerce as it is with most other systems. Took me a little while to get used to that but it doesn't really seem to cause issues...it would be quite easy to write plugin that clears the cart on logout if you would prefer that).

  • No not the front end but the back end on the commerce plugin where it shows the active cart. When a user logs out their email disappears from their shopping cart so my client doesnt know who's email it belongs too so they can't push it through Commented May 6, 2017 at 19:38
  • 1
    Well again that really would be by design - the user has explicitly requested they log out of the site, so it clears the data. Again, you could write something that listens to logout and restores just the email, or you could store the email in your db table for later matching against the carts, but given the potential security issues (by keeping the email around, you're keeping one half of the login details available) - but users might not like it if they are then e.g. emailed... Commented May 7, 2017 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.