Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Passing a GET variable to softaculous remote



Threaded Mode | Print  

 Passing a GET variable to softaculous remote, passing variable (7 Replies, Read 1752 times)
webguyz
Group: Member
Post Group: Newbie
Posts: 25
Status:
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!
IP: --   

Passing a GET variable to softaculous remote
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5647
Status:
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
IP: --   

Passing a GET variable to softaculous remote
webguyz
Group: Member
Post Group: Newbie
Posts: 25
Status:
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!
IP: --   

Passing a GET variable to softaculous remote
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5647
Status:
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
IP: --   

Passing a GET variable to softaculous remote
webguyz
Group: Member
Post Group: Newbie
Posts: 25
Status:
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.
IP: --   

Passing a GET variable to softaculous remote
webguyz
Group: Member
Post Group: Newbie
Posts: 25
Status:
Any ideas?
IP: --   

Passing a GET variable to softaculous remote
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5647
Status:
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
IP: --   

Passing a GET variable to softaculous remote
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5647
Status:
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
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 19, 2024, 6:24 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.020