Skip to content

Commit

Permalink
added before login callback
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Oct 15, 2012
1 parent 2313c8f commit 6d566d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/components/guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ function startup(&$controller) {
return true;
}

if (method_exists($controller, 'beforeLogin')) {
$controller->beforeLogin();
}

if ($loginAction == $url) {
// we are in the login action
if (!$this->authModule->hasLoginData()) {
Expand Down Expand Up @@ -272,9 +276,9 @@ function isLoggedIn() {
*/
function logout() {
$this->authModule->logout();
if (method_exists($controller, 'afterLogout')) {
/*if (method_exists($controller, 'afterLogout')) {
$controller->afterLogout();
}
}*/
return parent::logout();
}

Expand Down

0 comments on commit 6d566d8

Please sign in to comment.