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. Here is the embedding code (simple) -
<?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] 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 ????? |
|

Posts: 32509
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
Posts: 17
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.
Posts: 32509
please read:
- http://codex.gallery2.org/Gallery2:Embedding:Integration#Login_And_Session_Management
- http://codex.gallery2.org/Gallery2:Embedding:Integration#Initial_User_Synchronization
- http://codex.gallery2.org/Gallery2:Embedding:Integration#User_Management
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage