Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-03T13:14:23-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2642 2011-04-03T13:14:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8957#p8957 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Vinnyo wrote:
Hey Jason,

OK well this makes sense then. However I need to have my users be able to edit posts..is there a way to allow the redirect and allow users to edit posts.

Basically is there some code I can delete or remove to allow this to happen on both ends.


Thanks
Vince

Yes, it is also possible to do this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_filter
("ws_plugin__s2member_login_redirect", "__return_true");
?>
* This forces a redirection to your Login Welcome Page, for everyone; regardless.

Or, if you want to get more specific, do something like this.
Code:
<?php
add_filter 
("ws_plugin__s2member_login_redirect", "my_function", 10, 2);
function my_function ($filter, $vars = array ())
    {
        if ($vars["user"]->has_cap ("s2member_level1"))
            return true;
        /**/
        else return $filter;
    }
?>
* This forces a redirection to your Login Welcome Page, for Level #1 Members,
even if they have the ability to edit_posts.

Statistics: Posted by Jason Caldwell — April 3rd, 2011, 1:14 pm


]]>
2011-04-02T22:44:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8920#p8920 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>

Statistics: Posted by Cristián Lávaque — April 2nd, 2011, 10:44 pm


]]>
2011-04-02T22:15:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8917#p8917 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
It seems there was a combination of problems..one effecting another but you guys helped and it now works ;)


Thanks a bunch

Vince

Statistics: Posted by Vinnyo — April 2nd, 2011, 10:15 pm


]]>
2011-04-02T22:01:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8916#p8916 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
I am looking through it now.

Thanks
Vince

Statistics: Posted by Vinnyo — April 2nd, 2011, 10:01 pm


]]>
2011-04-02T21:19:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8913#p8913 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> viewtopic.php?f=4&t=2642#p8902

You'd add it to the links that point to the wp-login.php page. What is the URL to your login page? Add ?redirect_to=/welcomepageexample and see if it works after you log in. ;)

Statistics: Posted by Cristián Lávaque — April 2nd, 2011, 9:19 pm


]]>
2011-04-02T20:00:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8912#p8912 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
No, I still have access to the wp-admin area. So do my users. The main problem is that instead of going to
www.linkamotion.com/welcomepageexample, users were going straight to the WP-admin area. They need to go to this area and be able to perform duties to write posts and publish those posts. All of this still works. I am using a capabilities plugin. I just wanted them to go to my welcome page first and from there I have provide a link on that page to go to the wp-admin area.

However...the reason why the redirect in S2member is not working for users who have a S2member level 1is because according to Jason if the user has the ability or capability to "edit posts" then S2member does not redirect to the www.linkamotion.com/welcomepageexample.

Now you mentioned that code above could solve all these issues. If that is the case were roughly in the wp-login.php file do I insert it. I would like to give it a try and see how if this will solve the issue.

Thanks for your help I appreciate it.

Statistics: Posted by Vinnyo — April 2nd, 2011, 8:00 pm


]]>
2011-04-02T19:44:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8908#p8908 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Let me see if I understand:

The problem is that your users can't go to the admin area? Even if the click on the link to it? If that's the case, then it may be a problem with their role setting, where WP doesn't believe they should be there.

What plugin are you using to give them edit priviledges? If they had that, they should be allowed into the backend.

If they have the priviledge to get back there, WP would normally redirect them there after login, which is what I know understand you want. Is that it?

Statistics: Posted by Cristián Lávaque — April 2nd, 2011, 7:44 pm


]]>
2011-04-02T19:37:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8907#p8907 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
The thing is I still need to access the wp-admin area so I can review posts and approve them or not.

By the sounds of it the code below will redirect me to the same page my users are going???? If that is the case that may not work for me.

See what is suppose to happen is users login to the page I have been trying to redirect to....from there they get all the info they need and learn how to use the system. On that page I have a redirect link that allows users to go to the backend or wp-admin area were they can add posts, edit posts and more.

I have a link in the wp-admin area that goes to the frontend page I have been having redirect issues with but I prefer people to go to this page first.

So basically my users can go from a frontend page to the backend (wp-admin) area without issue. This was working but with the latest updates this is not the case.


The problem is close to being resolved...real close :)

Thanks
Vince

Statistics: Posted by Vinnyo — April 2nd, 2011, 7:37 pm


]]>
2011-04-02T19:15:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8902#p8902 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
http://yoursite.com/wp-login.php?redirect_to=/the-page-you-want


That will also redirect you when you login from there, but that'd be a minor inconvenience if it solves the problem for the rest of the users, I imagine.

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — April 2nd, 2011, 7:15 pm


]]>
2011-04-02T18:57:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8898#p8898 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
OK well this makes sense then. However I need to have my users be able to edit posts..is there a way to allow the redirect and allow users to edit posts.

Basically is there some code I can delete or remove to allow this to happen on both ends.


Thanks
Vince

Statistics: Posted by Vinnyo — April 2nd, 2011, 6:57 pm


]]>
2011-04-02T13:32:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8864#p8864 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> Hi Vince. Thanks for the follow-up.
Have you modified any of your s2Member Roles?
s2Member will not redirect Users/Members who have the ability to "edit_posts".

Statistics: Posted by Jason Caldwell — April 2nd, 2011, 1:32 pm


]]>
2011-03-31T22:32:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8780#p8780 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Good news, bad news...OK so the redirect is working...yes it is working but only for "subscribers" and not for users who have the "S2member LEVEL 1" access. This is the setting for all paying users so they are still being redirected to the wp-admin area. I checked the S2member settings but don't see where I can correct this.

We are close!

Talk to you soon

Thanks
Vince

Statistics: Posted by Vinnyo — March 31st, 2011, 10:32 pm


]]>
2011-03-31T20:54:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8778#p8778 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> Oh, I'm glad you brought this up.

Wordpress has a hidden login redirect form in the wp-login.php file. Should that be removed as well?

No, references to the `redirect_to` variable inside the `/wp-login.php` file should remain.

This is where the `redirect_to` variable is actually implemented, and we don't want to disable the functionality all together; just in case you ever need it for a useful purpose. For example, WordPress itself uses this in several places within your Dashboard, which is a good thing. This only gets in the way when it's used on login forms on the front-end of your site; causing clashes with your Login Welcome Page.

Statistics: Posted by Jason Caldwell — March 31st, 2011, 8:54 pm


]]>
2011-03-31T16:12:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8746#p8746 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Ooops I forgot to mention that I did a backup and of course that redirect reappeared. However I did remove this before and nothing had changed. I will remove it again and check any plugin cache settings but I don't think I have any plugins that have a cache file.

I will post back again once I have cleared that redirect.

Thanks
Vince

PS ----Wordpress has a hidden login redirect form in the wp-login.php file. Should that be removed as well?

Statistics: Posted by Vinnyo — March 31st, 2011, 4:12 pm


]]>
2011-03-31T03:20:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8673#p8673 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> Thanks Vince. I got your email. I just took another look at your site. That hidden redirect_to variable is still in your site. You might take another look at your theme files and make sure you've removed all occurrences of that variable. Also, be sure that you reset any WordPress® caching plugins after making those changes. For instance, if you're running Super Cache or Quick Cache, please clear your cache after making theme changes.

Statistics: Posted by Jason Caldwell — March 31st, 2011, 3:20 am


]]>
2011-03-28T17:29:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8520#p8520 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Thanks for the video. However this still did not fix my problem????? I sent you another email with the bulletarticles@gmail.com email.

Let me know if you got it. I have placed some questions in there.

Thanks
Vince


Thanks Vince. I got your email. I just took another look at your site. That hidden redirect_to variable is still in your site. You might take another look at your theme files and make sure you've removed all occurrences of that variable. Also, be sure that you reset any WordPress® caching plugins after making those changes. For instance, if you're running Super Cache or Quick Cache, please clear your cache after making theme changes.

Statistics: Posted by Vinnyo — March 28th, 2011, 5:29 pm


]]>
2011-03-27T05:04:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8439#p8439 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> Hi Vince. Thanks for getting back with me again.
~ I received your email this time!
Video
OK, I've done a quick video covering the way you can fix this problem.
http://www.s2member.com/login-welcome-p ... cts-video/

Statistics: Posted by Jason Caldwell — March 27th, 2011, 5:04 am


]]>
2011-03-25T14:38:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8356#p8356 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> I posted that info again for you.
I thought I made another post yesterday here but for some reason it did not take.

Statistics: Posted by Vinnyo — March 25th, 2011, 2:38 pm


]]>
2011-03-24T16:51:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8304#p8304 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Vinnyo wrote:
Hey Jason,

Have you had a chance to see what the issue is with that redirect. Just checking.

Thanks
Vince

Hi Vince. Thanks for the reply.

I've tried to email you a few times, but I think we have some barrier between us regarding email. Whenever I went to investigate this, I was unable to locate the email that you said you sent over. I've emailed you a couple times regarding this, but I suspect they are not making it back to you. Please try again using our contact form; possibly from a different email address. Once the email is sent, please update this thread so I'm aware of any additional conflicts that may arise.

Thanks in advance for your patience.

Statistics: Posted by Jason Caldwell — March 24th, 2011, 4:51 pm


]]>
2011-03-24T16:22:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8302#p8302 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Have you had a chance to see what the issue is with that redirect. Just checking.

Thanks
Vince

Statistics: Posted by Vinnyo — March 24th, 2011, 4:22 pm


]]>
2011-03-23T01:15:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8184#p8184 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> Statistics: Posted by Jason Caldwell — March 23rd, 2011, 1:15 am


]]>
2011-03-19T00:18:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8011#p8011 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Info sent

Statistics: Posted by Vinnyo — March 19th, 2011, 12:18 am


]]>
2011-03-18T23:15:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=8009#p8009 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
Vinnyo wrote:
Would it be possible to have you look at my c-panel and see if you see something. You know S2memeber the best versus myself who has spent countless hours trying anything to get a redirect to work.
Yes, please send me a Dashboard login and FTP access through this form.

Statistics: Posted by Jason Caldwell — March 18th, 2011, 11:15 pm


]]>
2011-03-18T17:47:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=7995#p7995 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]>
So have attempted everything to try to get the S2memeber redirect but it seems nothing I have done is working.

I have thought that maybe downgrading to a lower WP version would be a good idea but it is my worst fear to have my site attacked since all users rely on my service to work.

I tried what you suggested with the hack code but got script errors. Maybe I did it wrong.

Would it be possible to have you look at my c-panel and see if you see something. You know S2memeber the best versus myself who has spent countless hours trying anything to get a redirect to work.

Let me know if this is something you can do.

Thanks
Vince

Statistics: Posted by Vinnyo — March 18th, 2011, 5:47 pm


]]>
2011-03-15T14:49:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2642&p=7871#p7871 <![CDATA[Re: Login Redirect Not Working - Need Help Fast]]> viewtopic.php?f=36&t=2697

Statistics: Posted by Jason Caldwell — March 15th, 2011, 2:49 pm


]]>