show label 'Manage Site'

jjreina

Joined: 2010-03-08
Posts: 22
Posted: Thu, 2010-03-25 09:32

I created a user by code, but when I show in gallery tag does not appear to manage site.
How can I make it show?

A greeting and thank you very much.

I try:

function init()
{
require_once ('/embed.php');
$ret = GalleryEmbed::init(array('fullInit'=>true,'g2Uri' => '/gallery2 /main.php'));
if ($ret)
{
print 'GalleryEmbed::init failed, here is the error message: '.$ret->getAsHtml();
exit;
}
GalleryEmbed::done();
}
init();
$ret1 = GalleryEmbed::createUser(4,array('username' => 'nuevo1'));
if ($ret1)
{
print 'GalleryEmbed::creteUser failed, here is the error message: '.$ret1->getAsHtml();
exit;
}
$ret = GalleryCoreApi::addUserPermission(54,57, 'core.edit');
if ($ret)
{
print 'GalleryCoreApi::addUserPermission: '.$ret->getAsHtml();
exit;
}

 
jjreina

Joined: 2010-03-08
Posts: 22
Posted: Thu, 2010-03-25 09:41
jjreina wrote:
I created a user by code, but when I show in gallery tag does not appear to manage site.
How can I make it show?

A greeting and thank you very much.

I try:

function init()
{
require_once ('/embed.php');
$ret = GalleryEmbed::init(array('fullInit'=>true,'g2Uri' => '/gallery2 /main.php'));
if ($ret)
{
print 'GalleryEmbed::init failed, here is the error message: '.$ret->getAsHtml();
exit;
}
GalleryEmbed::done();
}
init();
$ret1 = GalleryEmbed::createUser(4,array('username' => 'nuevo1'));
if ($ret1)
{
print 'GalleryEmbed::creteUser failed, here is the error message: '.$ret1->getAsHtml();
exit;
}
$ret = GalleryCoreApi::addUserPermission(7,57, 'core.edit');
if ($ret)
{
print 'GalleryCoreApi::addUserPermission: '.$ret->getAsHtml();
exit;
}

4 -> id external; 57 -> id G2 associate; 7 -> id album;