I have a web site at what-i.com that uses Drupal Commons profile. I have created a custom theme called 'whati' and placed it in /sites/all/themes folder. My page-front.tpl.php is supposed to drive my front page.
It has an if-else statements for 2 scenarios: logged in and non-logged in users. For logged in users, everything works great: upon logging in, the user sees my custom front page. For non logged (anonymous) users, it always forwards them to http://what-i.com/user?destination=home. I don't know how to override that redirect: it does not pick up on the if statement in my page-front.tpl.php, I tried using frontpage module with no success, and I also tried to change the front page settings under Site Information to no avail.
Can anybody help me to resolve this issue: that is, instead of being redirected to user?destination=home, I want my anonymous users to see a custom front page I created.
You can do this from a TPL file or a module init().
From a x.tpl.php:
From a module: