Skip to content

Instantly share code, notes, and snippets.

@kodi
Created December 30, 2009 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kodi/266079 to your computer and use it in GitHub Desktop.
Save kodi/266079 to your computer and use it in GitHub Desktop.
function index(){
$this->_switchHome();
}
function _indexAdmin(){
#show view
$this->view->show("home-admin");
}
function _indexPublic(){
#show view
$this->view->show("home-public");
}
function _indexPublic(){
#show view
$this->view->show("home-registered");
}
function _switchHome(){
if($user->isRegistered()){
if($this->user->isAdmin()){
$this->_indexAdmin();
}else{
$this->_indexRegistered();
}
}else{
$this->_indexPublic();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment