Hi!
I've customised the AuthPlugin file in order to authenticaticate users
using another user database. It seems to work, and the users are able to
log in and edit articles. However, they are not able to save the user
preferences. (I tried to change mine, and by checking user_options, I made
it clear that it is not a caching issue.)
The code:
http://pastey.net/8021 (The actual authentication)
http://pastey.net/8022 (JuventeAuth.php, modified AuthPlugin.php)
The extension was installed by putting these two lines in LocalSettings.php
require_once('extensions/JuventeAuth.php');
$wgAuth = new JuventeAuth();
When I disabled the last line, preference saving worked, so it is likely
that the error is in my files somewhere. I'm quite a newbie to MediaWiki,
and skipped everything that contained the word "domain" when configuring.
Then, I had a look through SpecialUserlogin.php to check whether real name
and e-mail could mandatory, as my code doesn't fetch that. That was a
blind shot, as my profile is the same as before the change, and my
username/password is the same in both databases.
Finally, I disabled strict(), and asked two users to log in using their
original wiki accounts (ie. not the new ones they got after we added the
external authentication), but they weren't able to save their prefs either.
A helping person in #mediawiki@freenode suggested that it might be a
session issue, and that I was responsible for setting the session
variables.
Things to note:
- autoCreate() returns true
- my auth. database is not the same as the wiki database
- MW version 1.6.8 (As we're only using PHP 4)
I'm grateful for any comments or suggestions!
--
Martin Strand
8110 Moldjord (Hybel: Mørkvedtråkket 21, 8026 Bodø)
970 27848
martin.strand(a)gmail.com / MSN: martin__strand(a)hotmail.com
Kan du "inline-quoting"? Bruk det, for det gjør jeg!