Arrow

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

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Disable functionality ... only sometimes? :)
October 12, 2011
12:26 pm
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!

October 12, 2011
12:58 pm
Peter
Admin
Forum Posts: 841
Offline

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.

October 17, 2011
4:27 pm
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!!

October 17, 2011
7:43 pm
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)!!!!

October 18, 2011
12:31 am
Peter
Admin
Forum Posts: 841
Offline

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.

October 19, 2011
7:36 pm
chris
Guest

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

November 12, 2011
9:49 am
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!

November 12, 2011
9:53 am
Peter
Admin
Forum Posts: 841
Offline

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