I'm not sure if this is a bug, or something that I'm doing incorrectly. In any-case first it seems that when a registered user makes an order with paypal the transaction->mail field is never set. I think this might be intentional, most of the code seems to check for this and looks up the email using the uid instead.
But there is a problem if I try to edit the transaction, such as changing payment status. In that case this code is called:
function store_transaction_validate_overview(&$edit) {
global $user;
...
if (!$edit['mail'] && $edit['uid'] != 0) {
$edit['mail'] = $user->mail;
}
...
}
The problem is that the global user is me, since i'm an admin who is editing someone else's transaction. And that means that my email is set as the transaction email. I've changed the code to this and it seems to work:
$edit['mail'] = db_result(db_query('SELECT mail FROM {users} WHERE uid = %d', $edit['uid']));
Please let me know if this really sounds like a bug, or if I'm somehow not understanding things correctly.
Thanks,
Jesse
Comments
Comment #1
simemoving all notification issues under ec_mail. There are a lot and should be checked together.
Comment #2
brmassa commentedfixed on ec3.2rc* and ec4
Comment #3
(not verified) commented