Basic layout and login functioning
This commit is contained in:
@@ -12,11 +12,14 @@
|
||||
*/
|
||||
class lnApp_Controller_Logout extends Controller {
|
||||
public function action_index() {
|
||||
# If user already signed-in
|
||||
if (Auth::instance()->logged_in()!= 0) {
|
||||
// If user already signed-in
|
||||
if (Auth::instance()->logged_in() != 0) {
|
||||
$ao = Auth::instance()->get_user();
|
||||
|
||||
if (method_exists($ao,'log'))
|
||||
$ao->log('Logged Out');
|
||||
|
||||
Auth::instance()->logout();
|
||||
$ao->log('Logged Out');
|
||||
|
||||
HTTP::redirect('login');
|
||||
}
|
||||
|
@@ -158,10 +158,11 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
|
||||
|
||||
if ($this->auto_render) {
|
||||
// Application Title
|
||||
if ($mo=ORM::factory('Module',array('name'=>Request::current()->controller())) AND $mo->loaded())
|
||||
if (class_exists('Model_Module') AND $mo=ORM::factory('Module',array('name'=>Request::current()->controller())) AND $mo->loaded())
|
||||
$this->meta->title = sprintf('%s: %s',Kohana::$config->load('config')->appname,$mo->display('name'));
|
||||
else
|
||||
$this->meta->title = Kohana::$config->load('config')->appname;
|
||||
|
||||
$this->template->title = '';
|
||||
|
||||
// Language
|
||||
|
Reference in New Issue
Block a user