When an anonymous user completes a checkout, and the store is set to create a new user account for that user but not automatically log them in, then the completion page displayed to the user specifies the new password as "Your password". Refer following:
Order complete
Your order is complete! Your order number is 3.
Thank you for shopping at Mainspring Six-Test. A new account has been created for you here that you may use to view your current order status.
Login to your new account using the following information:
Username: user03
Password: Your password
Return to the front page.This function worked fine in Ubercart release 2.7, so the changes to create 2.9 have caused the problem, which is that the data attribute "$order->password" is missing when the above messages are generated.
My investigations show that when the function "uc_cart_checkout_complete" (in file uc_cart.pages.inc") is called as the menu item "cart/checkout/complete" that it loads the order from the order_id in $_SESSION but this copy of the order no longer has the attribute "$order->password" set so when the call is made to function "uc_cart_complete_sale" it cannot set the variables required for substituion into the messages to display on the completion page.
Note that the function "uc_cart_complete_sale" was called earlier in the process by "uc_payment_enter" (in file uc_payment.module") and at that time the $order->password attribute was present.
Note also that the two emails sent to the anonymous user both have the password correctly embedded. The Drupal standard system email "register_no_approval_required" email (see "admin/user/settings") is sent in function "uc_cart_complete_sale_account" (which is called by "uc_cart_complete_sale" and is the place where the new password is generated). I don't know where that other email is sent from, but it comes from the template "uc_order-customer.tpl.php".
A work around is to replace the checkout completion message to remove the account credentials and advise that the new account details have been emailed to the user.
Comments
Comment #1
mattgilbert commentedSame issue here. I just replaced the checkout message like you suggested.
Comment #2
tr commentedDuplicate of #1558410: Account created - password is "your password". Please contribute to that issue if you would like to see this resolved.