Integer bug in login_or_register
Closed this issue · 1 comments
I've got a pretty much default install of FuelPHP 1.7.2 with OrmAuth and it kept failing to authenticate. My configuration was to only use Facebook so I turned off multiple providers.
I found the solution to my issue in Auth_Opauth->login_or_register(), line 210, just declaring the result as integer:
from: $num_linked = ($result and $result = $result->current()) ? $result['count'] : 0;
to: $num_linked = ($result and $result = $result->current()) ? (int) $result['count'] : 0;
Line 213 is checking if the result is exactly 0, but the result comes back as a string so kept failing. If you use multiple providers you would never see this issue.
Thank you for a great product,
/Andy
Very good find, thanks! All our apps use multiple providers, so I hadn't encountered this issue.