Created
May 19, 2012 06:48
-
-
Save mojaie/2729768 to your computer and use it in GitHub Desktop.
CakePHP:test002_0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AppController extends Controller { | |
public $components = array('Auth'); | |
public function beforeFilter(){ | |
$this->Auth->authorize = 'Controller'; | |
$this->Auth->loginRedirect = '/'; | |
$this->Auth->logoutRedirect = '/'; | |
if ($this->Auth->loggedIn()) { | |
$this->set('authUser', $this->Auth->user()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment