Page 1 of 1

Login redirect advanced conditional not working

PostPosted: January 17th, 2012, 7:16 am
by niallw
Hi,

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: Select all
<?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

Re: Login redirect advanced conditional not working

PostPosted: January 19th, 2012, 11:10 pm
by Raam Dev