Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Universal sign-in with ReturnUrl
I'm building a site and I'd like it to have one univeral sign-in that will allow the member access onto the forum (vanilla of course) and other features within the site. I noticed this snippet:
So my question(s) are:
1. How do I specify a ReturnUrl?
2. If successful, how do I access the session variables that vanilla sets?
3. How can I add additional inputs / variable during registration?
Thanks for your help guys!
$this->ReturnUrl = urldecode(ForceIncomingString('ReturnUrl', ''));
if ($this->ReturnUrl != '') $this->PostBackParams->Add('ReturnUrl', $this->ReturnUrl);
So my question(s) are:
1. How do I specify a ReturnUrl?
2. If successful, how do I access the session variables that vanilla sets?
3. How can I add additional inputs / variable during registration?
Thanks for your help guys!
0
This discussion has been closed.
Comments
people.php?ReturnUrl=where/to/send/them/after.html
As for accessing the session / cookie variables, there's a pretty decent summary of that over here:
http://lussumo.com/community/discussion/2654/?Focus=32933#Comment_32933
Finally, you can take a look at the discovery extension or the extended application form extension to see how I added inputs to registration over there:
Discovery Extension
Extended Application Form Extension
people.php?ReturnUrl=../index.php
Or this:
people.php?ReturnUrl=/home/user/index.php
Neither seem to be working for me.
people.php?ReturnUrl=http://www.domain.com/sub/index.php
people.php?ReturnUrl=http://www.MyRealDomain.com/forum/
to
people.php?ReturnUrl=http://www.MyRealDomain.com
it still returns to the forum directory. Do I have to set a variable somewhere else maybe?
// Automatically redirect if this user isn't a user administrator or there aren't any new applicants $AutoRedirect = 1; if ($this->Context->Session->User->Permission('PERMISSION_APPROVE_APPLICANTS')) { $this->ApplicantCount = $UserManager->GetApplicantCount(); if ($this->ApplicantCount > 0) $AutoRedirect = 0; } if ($this->ReturnUrl == '') { $this->ReturnUrl = $this->Context->Configuration['FORWARD_VALIDATED_USER_URL']; } else { $this->ReturnUrl = str_replace('&', '&', $this->ReturnUrl); } if ($AutoRedirect && $this->ReturnUrl != '') { header('location: '.$this->ReturnUrl); // die(); }
Here is the same thing in plain english:
If the user has permission to approve new applicants and there are new applicants, don't automatically forward him/her. Otherwise... If there is a return url, do some formatting so it works properly, and send the user to that url.