diff --git a/controllers/class.Login.php b/controllers/class.Login.php new file mode 100644 index 000000000..812b8f7c9 --- /dev/null +++ b/controllers/class.Login.php @@ -0,0 +1,35 @@ + + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which does the busines logic when logging in + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Controller_Login extends SeedDMS_Controller_Common { + + public function run() { + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + $session = $this->params['session']; + + if($this->callHook('postLogin')) { + $session->setSplashMsg(array('type'=>'success', 'msg'=>'Hallo, du bist als "'.$user->getFullname().'" eingeloggt')); + } + } +} diff --git a/op/op.Login.php b/op/op.Login.php index 5789f252e..28e9fde63 100644 --- a/op/op.Login.php +++ b/op/op.Login.php @@ -24,7 +24,9 @@ include("../inc/inc.Language.php"); include("../inc/inc.ClassSession.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); +include("../inc/inc.ClassController.php"); include("../inc/inc.ClassEmail.php"); +include("../inc/inc.Extension.php"); include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc"; @@ -40,6 +42,9 @@ function _printMessage($heading, $message) { return; } +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$controller = Controller::factory($tmp[1]); + if (isset($_REQUEST["sesstheme"]) && strlen($_REQUEST["sesstheme"])>0 && is_numeric(array_search($_REQUEST["sesstheme"],UI::getStyles())) ) { $theme = $_REQUEST["sesstheme"]; } @@ -293,6 +298,10 @@ else if (isset($_GET["referuri"]) && strlen($_GET["referuri"])>0) { $referuri = urldecode($_GET["referuri"]); } +$controller->setParam('user', $user); +$controller->setParam('session', $session); +$controller->run(); + add_log_line(); if (isset($referuri) && strlen($referuri)>0) {