from: if (THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'usercp') to: if (!in_array(THIS_SCRIPT,array('profile','usercp','login')))