User Synchronization(MediaWiki)

almandot

Joined: 2007-05-03
Posts: 13
Posted: Thu, 2007-05-24 00:01

I'm currently trying to integrate login sessions with mediawiki... and I can't seem to get the galleryembed functions to work properly.

Doing a simple embedded page where I call init and handlerequest with a blank user ID works fine.

For one, the whole externalidmap thing seems unresponsive. addExternalIdMapEntry didn't do anything.. I tried manually entering a mapping for a current user and that didn't work out either.. the data type of entityType is an integer in the database so I'm not sure what it expects when I pass it "GalleryUser".. Whenever I try and pass a mapped user id while init'ing the gallery page I get error unable to find object <uid> GalleryUser. I'm not sure how it'll ever find something mapping to GalleryUser since all I can store in the database entry is an integer since I can't find an entitytype->integer definition.

Error (ERROR_MISSING_OBJECT) : 1 GalleryUser
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 124 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 2290 (GalleryEntityHelper_simple::loadEntityByExternalId)
in modules/core/classes/GalleryEmbed.class at line 215 (GalleryCoreApi::loadEntityByExternalId)
in modules/core/classes/GalleryEmbed.class at line 120 (GalleryEmbed::checkActiveUser)
in /home/content/a/l/m/almandot/html/wiki/gallery.php at line 65 (GalleryEmbed::init)
in /home/content/a/l/m/almandot/html/wiki/gallery.php at line 20

But onto freshly created users... I call createUser in the mediawiki hook and nothing happens at all. Just hangs there and nothing ever gets written to the gallery2 database or mediawiki database.

function addUser($user, $password)
{
GalleryEmbed::createUser($user->mId, array('username' => $user->mName,
'email' => $user->mEmail,
'fullname' => $user->mRealName,
'hashedpassword' => $password,
'creationtimestamp' => $user->mRegistration));
return true;
}

Any ideas on how to approach any of this? Help is appreciated.