Embedding help: activeUserId error !!

iosoft

Joined: 2007-04-17
Posts: 17
Posted: Wed, 2007-09-05 05:48

I need a very very small help on Embedding G2.

I have my own login system for my website.
G2 site is - http://www.festivalofbollywood.com/g2/

Here is the embedding code (simple) -
http://www.festivalofbollywood.com/g2/mylogin.php
Purpose is just to auto-login to G2 when someone login with default login form.
The main gallery content will be shown by Wrapper-Class.

<?php
require_once(dirname(__FILE__) . '/embed.php');

$ret = GalleryEmbed::init(array( 'embedUri' => '/g2/', 'g2Uri' => 
'/main.php', 'activeUserId' => 'iosoft'));

if ($ret) {
//$ret->getAsHtml() has error details..
exit;
}

$gallery->setConfig('login', true); // don't know what it should be.
$g2data = GalleryEmbed::handleRequest();

.....
?>

[font color=red]The error is -[/font]
whenever I include the 'activeUserId' parameter it is generating this
error -

Err: Error (ERROR_MISSING_OBJECT) : iosoft GalleryUser

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 
124 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 2298 
(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 mylogin.php at line 22 (GalleryEmbed::init)

But there is 'iosoft' user in both.

Whats wrong ?????

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-09-05 10:32

topic moved to the integration forums.

please read:
documentation -> development -> embedding gallery

the user specified with "activeUserId" must be first mapped to your gallery users.

does your site already have a login system and a userbase (some database with user accounts)?
if so, you want to use GalleryEmbed + map all those users with your gallery-userbase.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
iosoft

Joined: 2007-04-17
Posts: 17
Posted: Wed, 2007-09-05 10:39

yes, both have th same UID/Password/email combination.

I am using the 'sample code' that I found in documentation -> development -> embedding gallery.

Still no luck.

I just want autologin no need to 'display' part.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-09-05 12:03