Carlton B wrote:
I am using AuthPlugin to authenticate against an external database. The first time a user logs in, without exception they see this error:
Fatal error: Call to a member function on a non-object in /home/myaccountname/public_html/mediawiki-1.4.2/includes/SpecialUserlogin.ph p on line 266
In the 1.4.2 release, Line 266 is:
if (!$u->checkPassword( $this->mPassword )) {
For this to fail in the way you describe, the LoginForm::initUser() method would have to return something broken when called here:
if ( $wgAuth->authenticate( $u->getName(), $this->mPassword ) ) { $u =& $this->initUser( $u );
It doesn't look like that should be possible, though, unless your plugin's initUser method (which is called from LoginForm's to optionally modify the user object before it's saved) looks something like this:
function initUser( &$u ) { $u = 'This will break'; }
If you're modifying the user object in that method, make sure you're not replacing it with a non-object.
-- brion vibber (brion @ pobox.com)