I used this script and noticed a few quirks.
On my setup, it log in, but not with User data (it would just appear the IP). This was due two things:
I noticed that
$smf_member_id = $user->getOption('smf_member_id'); would always return 0 even if the Option was set to something else. This made the code to fail the authentication.
By checking the source, Mediawiki will return the option default value if the option is set to Hidden (as it is in this extension).
Also, even if everything checked out, the user data from mediawiki user would never be loaded. I added.
if ($user->getID() == 0)
andre nickatina version seems a bit different and I might try it out.