Re: [Illume Magazine] Membership Auto Login
Hi,
Here is what you can try (Note that this example is assuming your using the signup form that came with the plugin)
First, you need to add a hidden field to the form to hold the page that the user was at previously. Add this to the end of the form:
<?php if(@$_REQUEST['previous']): ?>
<input type="hidden" name="previous" value="<?php echo $_REQUEST['previous'];?>" />
<?php else: ?>
<input type="hidden" name="previous" value="<?php echo $_SERVER['HTTP_REFERER'];?>" />
<?php endif ?>
</form>
The next change is to execute the login and the redirect. Closer to the top of the page you'll see a line that says:
_websiteLogin_sendSignupMessage();
This is the function that sends the email. We're going to add this code below it:
_websiteLogin_sendSignupMessage();
$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL']=@$_REQUEST['previous'];
_websiteLogin_login();
What this will do is set the redirect url to the page the user was at before going to the sign up form and then execute the login function.
Give this a try.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/