Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-19T23:10:07-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16910 2012-01-19T23:10:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16910&p=61061#p61061 <![CDATA[Re: Login redirect advanced conditional not working]]> viewtopic.php?f=4&t=16849&p=61060#p60914

Statistics: Posted by Raam Dev — January 19th, 2012, 11:10 pm


]]>
2012-01-17T07:16:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16910&p=60809#p60809 <![CDATA[Login redirect advanced conditional not working]]>
I am trying to implement the advanced conditional statement to redirect users away from the welcome page if they are at membership level 1.

I have installed the php exec plugin and placed the following 'if else' statement using location headers in the login welcome page in an attempt to redirect the users at level 1. Code is as follows:-

Code:
<?php if (current_user_can("access_s2member_level1")){
    header("address here");
} else {
    header("address here");
} ?>


This is not working. I am getting the following error message and am unsure what it means -

Warning: Cannot modify header information – headers already sent by (output started at /homepages/39/d372554375/.............../template-full-width.php:7) in /homepages/39/d372554375/................./wp-content/plugins/php-execution-plugin/includes/class.php_execution.php(273) : eval()’d code on line 29

Could anyone assist?

Thanks,

niallw

Statistics: Posted by niallw — January 17th, 2012, 7:16 am


]]>