Created
May 24, 2012 02:33
-
-
Save pedroelsner/2779102 to your computer and use it in GitHub Desktop.
#2 User.php - CakePHP 1.3 + AuthComponent
This file contains hidden or 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 | |
/** | |
* Login | |
* | |
* @access public | |
*/ | |
function login() | |
{ | |
// Aqui é tudo automagic. | |
// O Auth Component se encarrega de fazer tudo sozinho. | |
} | |
/** | |
* Logout | |
* | |
* @access public | |
*/ | |
function logout() | |
{ | |
$this->Session->setFlash(__('Sua sessão foi encerrada.', true)); | |
$this->redirect($this->Auth->logout()); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment