[Mediawiki-l] AuthPlugins and Overwriting Preferences
Michael B Allen
ioplex at gmail.com
Thu Nov 15 18:10:49 UTC 2007
Hi,
When AuthPlugin::updateUser() is called I would think that the
preferences that have not changed would be left unchanged in the local
MW DB but that is not the case. Here's my code:
function updateUser( &$user ) {
if (is_array($this->acct)) {
$user->setOption('nickname', $username);
if (isset($this->acct['displayName']))
$user->setRealName($this->acct['displayName']);
if (isset($this->acct['mail']))
$user->setEmail($this->acct['mail']);
$user->setPassword(NULL);
$user->saveSettings();
return true;
}
return false;
}
It seems that even though only the nickname, real name and email
address are updated, all other preferences are reset. How am I
supposed to update only a few fields without wrecking the prefs? From
looking at LdapAuthenticate.php it's not clear to me that it handles
this situation any differently.
Also, when trying to update preferences, if
AuthPlugin::updateExternalDB() returns false an error is displayed:
"There was either an external authentication database error or you are
not allowed to update your external account."
Why does this error occur? I do not want to store preferences
externally. Why does MW not store preferences locally regardless of
what updateExternalDB returns?
Thanks for any help,
Mike
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the MediaWiki-l
mailing list