Skip to content

Instantly share code, notes, and snippets.

@rtgibbons
Created December 10, 2010 00:29
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 rtgibbons/735569 to your computer and use it in GitHub Desktop.
Save rtgibbons/735569 to your computer and use it in GitHub Desktop.
<?php
function beforeFilter(){
parent::beforeFilter();
if ($this->action != 'index'){
if (!$this->Session->check('location')) {
$this->Session->setFlash(__('Need to enter your location ID and password first'));
$this->redirect(array('action' => 'index'));
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment