I think I have it working, in addition to modifying the hook to UserLoadFromSession, and adding &$result to the function prototype I did the following:
Changed the User::newFromName to initialize the $user object itself without replacing it... when it was replaced the calling function appeared to still have the old $user object which was giving an error.
In doing that I first load defaults, then set the name, set mFrom to name, call load, check if the user has a valid ID and if not add to the database, and then continue on.
In addition, I Found that the sysop groups weren't being removed when I removed someone from admin group so I added $user->removeGroup for both before then adding it again (or not) depending on the users vb group.
I'm not totally familiar with mediawiki's authorization process (I just installed it actually) so some of this may be redundant, or worse something could be missing....
At any rate it appears to be working if I find any problems I'll post here, I'm attaching my copy of AuthPlugin_vBSSO.php if anyone wants to use it.
Edit: Not working at this time, something is causing edit tokens (and maybe more) to not be correct during POST requests, still investigating
|