Arrow

Disable functionality ... only sometimes? :) | Peter's Login Redirect | Forum

Back to the login redirect plugin page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Disable functionality … only sometimes? :)

Reply to Post Add a New Topic
UserPost

12:26 pm
October 12, 2011


chris

Guest

I'll explain how I'm set up and what I'm interested in doing – you can then call me names, tell me I'm crazy, or succinctly solve my 'problem' – your choice which one!

I have a short&sweet url like this: http://site.com/auto-login.php…..newsletter

This link gets emailed once a week to the website's fanbase of about 200 people, letting them know that if they click the link they'll get whisked away, logged into the website, and go straight to the week's newsletter (at /Member/something/newsletter obviously). (Thanks to this website)

If members are not going to my site from this link, but instead just logging in as "UserName" with "EasyPassword" on my site, I'd like them to get taken to site.com/Member. For just this, the plugin works fine! But when I'm trying to send them to /Member/something/newsletter with the link in the email .. the plugin sends them to site.com/Member.

Any ideas how to circumvent the Login Redirect functionality? :)

Thanks in advance!

12:58 pm
October 12, 2011


Peter

Admin

posts 732

This can probably be coded, as an "extension" to the plugin. The idea is that you can insert your own logic in before or in between any of my plugin's rules. There is documentation and a general example here:

http://wordpress.org/extend/pl…..her_notes/

In short, you could read a global variable or the "redir" GET variable in your extension and have the plugin return that instead.

4:27 pm
October 17, 2011


chris

Guest

Sorry, the documentation is great but it's not clear to me where the extra bit of the 'extension' goes … just into functions.php?? Or into wplogin_redirect_control.php or something? THanks!!

7:43 pm
October 17, 2011


chris

Guest

Turns out you already let me do this!! All I did was switch this:

// Allow a POST or GET "redirect_to" variable to take precedence over settings within the plugin
$rul_allow_post_redirect_override = false;

to

// Allow a POST or GET "redirect_to" variable to take precedence over settings within the plugin
$rul_allow_post_redirect_override = true;

(lines 41-42)!!!!

12:31 am
October 18, 2011


Peter

Admin

posts 732

Ah, sorry for missing that. I thought you were using a differently named variable. I'm glad you've got it working for you now!

For future reference, if you ever need to extend the plugin in the way described, you could put the code in functions.php or in a separate extension.

7:36 pm
October 19, 2011


chris

Guest

Thanks for answering for the next guy! I really love this plugin – it makes it so foolproof :)

9:49 am
November 12, 2011


chris

Guest

chris said:

Thanks for answering for the next guy! I really love this plugin – it makes it so foolproof :)

Would you consider moving a few of the preferences out of the core plugin files (when the plugin is updated you have to remember to go back and re-instate the preferences)? Just a thought, thanks for the great plugin once again!

9:53 am
November 12, 2011


Peter

Admin

posts 732

Thanks for the suggestion. Yes, I should really move the settings to the WordPress database.

Reply to Post

Reply to Topic:
Disable functionality … only sometimes? :)

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
6 + 10