Good morning. Thanks to anyone who can help me. I have the following problem. I was able to open a page encapsulated in an iframe from the portal. However, I couldn't pass the UserRequest to my home page. I looked for information, but it's clearly not that simple. In my data model, I have the following code; the iTop version is 3.1.1. If you could help, I'd be grateful.
SetupWebPage::AddModule(__FILE__,//Pathtothecurrentfile,allotherfilenamesarerelativetothedirectorycontainingthisfile'misitio-portal-url-button/1.0.0',array(//Identification'label'=>'Portal - Botón de URL','category'=>'business',//Setup'dependencies'=>array(//'itop-portal/3.2.0','itop-portal-url-brick/1.1.1'),'mandatory'=>false,'visible'=>true,//Components'datamodel'=>array('model.misitio-portal-url-button.php'=>'datamodel.xml'),'webservice'=>array(),'dictionary'=>array('es_CR.dict.misitio-portal-url-button.php'),'data.struct'=>array(),'data.sample'=>array(),//Documentation'doc.manual_setup'=>'','doc.more_information'=>'',//Defaultsettings'settings'=>array(),));?>
Last edit: Carlos Cartechini 2025-08-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tell you, I was able to make an intermediate page that then calls my site, in it I wanted to use UseRights: in the following way
<?phprequire_once('../../approot.inc.php');require_once(APPROOT.'/application/application.inc.php');// Obtener el usuario actual$oUser=UserRights::GetUser();// Datos a enviar$userData=array('itop_user'=>oUser->Get('login'),'user_id'=>$oUser->GetKey(),'user_name'=>$oUser->Get('friendlyname'),'user_email'=>$oUser->Get('email'),'token'=>md5($oUser->Get('login').'clave-secreta')// Opcional: para validación);?><!DOCTYPE html><html><head><title>Redireccionando...</title></head><body><formid="postForm"action=">itopdes.misitio.com.ar/pages/pps-conf-ingresoreq/apps-conf-ingresoreq.php"method="post"><?phpforeach($userDataas$name=>$value):?><inputtype="hidden"name="<?=$name?>"value="<?=htmlentities($value)?>"><?phpendforeach;?></form><script>document.getElementById('postForm').submit();</script></body></html>
But I still get a 500 error. If anyone could guide me, I'd be grateful.
Last edit: Carlos Cartechini 2025-08-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I didn't check all the details of your post, but did you check the logs and/or try some debugging (e.g. by showing PHP errors in your code) to see what is the cause of the 500 error ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good morning. Thanks to anyone who can help me. I have the following problem. I was able to open a page encapsulated in an iframe from the portal. However, I couldn't pass the UserRequest to my home page. I looked for information, but it's clearly not that simple. In my data model, I have the following code; the iTop version is 3.1.1. If you could help, I'd be grateful.
datamodel.xml
module.php
Last edit: Carlos Cartechini 2025-08-27
I tell you, I was able to make an intermediate page that then calls my site, in it I wanted to use UseRights: in the following way
But I still get a 500 error. If anyone could guide me, I'd be grateful.
Last edit: Carlos Cartechini 2025-08-27
Hello, I didn't check all the details of your post, but did you check the logs and/or try some debugging (e.g. by showing PHP errors in your code) to see what is the cause of the 500 error ?
Looks like you're at least missing a $ in front of oUser.
Also, the form action seems incorrect (I wouldn't expect > in front of your URL)
Not 100% sure either if your foreach approach works or if they're considered individual PHP snippets.
Last edit: Jeffrey Bostoen 2025-09-01
Thanks for responding. I'm telling you, I found this way to do it. So far, I've got it figured out.
Thank you very much.