Skip to content
Snippets Groups Projects
Commit 2e788e05 authored by Tim Steiner's avatar Tim Steiner
Browse files

Throw an exception when calling Auth_UserModel::getCurrentUser() if no user is logged in.

parent 93b22510
No related branches found
No related tags found
No related merge requests found
......@@ -9,4 +9,13 @@ class Unl_Controller_Helper_Authorize extends Zend_Controller_Action_Helper_Abst
throw new Exception('You must be logged in to view this page.');
}
}
public function isLoggedIn()
{
$user = Auth_UserModel::findCurrentUser();
if ($user instanceof Auth_UserModel) {
return true;
}
return false;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment