My current configuration is allowing customers to place orders without having to log-in on checkout, even though they currently have accounts in the system, with the same e-mail we have stored for them,. These orders they place without being logged in are therefore not viewable in their order history when they do log-in. Is there any way to require that they log-in if their e-mail address exists in the system, before ordering? I've been looking for a setting in the admin but to no avail. I am using oneStepCheckOutAn. An admin setting would be preferred over having to insert validation code into the system, but anything helps! Thanks!
This may not be the solution you planned on, but I feel it is the better user experience (feel free not to accept this as an answer).
Based on my previous comments I have just open-sourced a module that achieves a similar result (guest orders linked to customers). However, in my module it allows a customer to associate a previous guest order to their account. This gives the power to the customer - if they want an order associated they have the ability to do so at a later date.
Based on Fabian and David's comments it may be a nice feature of the module to include an association link during the order confirmation if the customer meant to place the order under the registered account. David's feedback about how the link would work makes perfect sense and my fears about abuse have been allayed.
I hope that this module would be of some use for you as it was created in response to this thread.
Best of luck.