Softaculous


Topic : Passing a GET variable to softaculous remote


Posted By: webguyz on July 10, 2016, 2:53 pm
Have Softaculous remote server and would like to pass it a GET variable so that it becomes a SESSION variable. Want to use this in the Exit function so when the user quits Softaculous they end up in a designated folder.
Thanks!

Posted By: Brijesh on July 11, 2016, 9:27 am | Post: 1
Hi,

If you want to define a Logout URL you can define the following variable in :
/usr/local/softaculous/enduser/session.php
PHP Code

 define('SOFT_LOGOUT_REDIRECT''http://YOUR_REDIRECT.URL'); 



If this is defined Softaculous will redirect the user to this URL after logging out.

Edited by Brijesh : July 11, 2016, 9:27 am

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: webguyz on July 11, 2016, 2:03 pm | Post: 2
We do not use sessions.php but rather remote.php. I there we function remote which does this
function remote(){
    $this->logout = 'https://www.mydomain.net/home';  }
But now we want to add a variable  so that it can do this:
function remote(){    $accounted = $SESSION['accountid'];
    $this->logout = 'https://www.mydomain.net/home?accountid='.$accountid;  }We want to append a $GET variable on the URL string when we call softaculous so that it can become a SESSION variable and we can use that variable as above.
Thanks!

Posted By: Brijesh on July 14, 2016, 11:07 am | Post: 3
Hi,

Yes this is available in remote.php as you have mentioned you can use the following code :

PHP Code

 function remote(){
    
$this->logout'https://www.mydomain.net/home?accountid='.$SESSION['accountid'].'&';




-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: webguyz on July 14, 2016, 12:30 pm | Post: 4
My question is HOW to pass the 'accountid' to Softaculous. If the name accountid is already used by Softaculous then lets pretend I want to pass the variable 'bubba' so that we can use SESSION['bubba'] at logout.

Posted By: webguyz on July 18, 2016, 10:44 pm | Post: 5
Any ideas?

Posted By: Brijesh on July 19, 2016, 6:34 am | Post: 6
Hi,

Sorry for the delay.

At the moment it is not possible to add custom variable to $_SESSION

If you can contact me on my email (Shared you via PM) I can help you faster to create a workaround to achieve what you need.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: Brijesh on September 22, 2016, 8:06 am | Post: 7
Hi,

As per our discussion via support ticket this is what you needed :

Create session.php and upload it to the Softaculous Remote server at :
Code
/usr/local/softaculous/enduser/session.php


The session.php is loaded every time the session is created.

The session.php will get the product id (or any other custom variable) in $myexit using the parameter you passed via GET to Softaculous when you are redirecting the user to Softaculous from your control panel :
Code
http://autoinstaller.example.com/index.php?rsid='.$res['rsid'].'&exit='.$myuser1


So you will redirect the user to Softaculous using this :
PHP Code

 header('Location: http://autoinstaller.example.com/index.php?rsid='.$res['rsid'].'&exit='.$myuser1); 



Write the following code in session.php (create a new file if it does not exist)

PHP Code

 $myexit = (int) $_GET['exit'];
$mylogout 'https://cp.example.com/clientarea.php?action=productdetails&id='.$myexit.'&view=overview';

define('SOFT_LOGOUT_REDIRECT'$mylogout); 




Edited by Brijesh : September 22, 2016, 8:08 am

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.