Hello Nick,
By following your advice and having knowledge on the user that was involved, I went ahead and tried to reproduce the issue by executing the queries of the stored procedure that I've set in the SQL plugin.
The problem wasn't originated by my queries, which are all good, I discovered a bug on the latest version of JFusion, the bridge that I'm using for phpBB3.
In the stored proc, I was using the email field as the join between the Joomla and phpBB3 tables. JFusion is creating users in phpBB3 by lower casing the e-mail field, which is wrong, as the username part of the e-mail is case sensitive. The user obviously had an e-mail with upper case characters. Even worst, the collation of the phpBB3 table is utf8_bin which makes queries case sensitive
. Because of this two conditions, the stored proc wasn't able to find the user in the phpBB3 table.
I fixed my problem by making the join over the username instead of the e-mail, which is exactly the same. I'm reporting the bug on JFusion ASAP.
Thank you for your message. I should update the tutorial I provided for integrating CBSubs with phpBB3 in the CBSubs forums to avoid this problem while the bug is still present in Jfusion.
Regards and thank you for your time.
Arunas