Thanks for the error log. That helped us narrow down the cause. It looks like there's a bug in a very specific SQL query of ours. That query is only run if the new user logging in would have an automatically generated username that is the same as an existing user. For example, there is already a user "john.smith" on your site. If a new, different, John Smith comes, JFBConnect will try to automatically generate the username john.smith. Since that can't be used, JFBConnect *should* be trying to generate john.smith1. That query for that collision seems to be broken.
With that long explanation out of the way, the solution is a one line change in the /libraries/sourcecoast/utilities.php file. Around line 622, you'll see:
$query = "SELECT CAST(REPLACE(username, " . $dbo->quote($prefix) . ", '') AS INT) suffix FROM #__users WHERE " . $dbo->qn('username') . " ~ '^" . $prefix . "[0-9]+$' ORDER BY " . $dbo->qn('suffix') . " DESC LIMIT 1";Please replace that line with:
$query = 'SELECT CAST(REPLACE(username, ' . $dbo->quote($prefix) . ', "") AS UNSIGNED) suffix FROM #__users WHERE `username` REGEXP "^' . $prefix . '[[:digit:]]+$" ORDER BY `suffix` DESC LIMIT 1';
Please let me know how that goes. This was a bug introduced in our last (v5.2.2) release, and we weren't aware of it until now. Obviously, this fix will be in the next release, but we'd love to have confirmation of it.
Thanks,
Alex