openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5959ff7fc636173390e9a06b7cbef0bad2e5f077
parent 78b0794fc8d22b7e347e3da6028359dca9f5bcf8
Author: dankert <devnull@localhost>
Date:   Fri,  9 Nov 2007 00:06:15 +0100

Umwandlung aller Templates nach Logout (konfigurierbar), Ok-Meldung nach Login.

Diffstat:
actionClasses/IndexAction.class.php | 23++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/actionClasses/IndexAction.class.php b/actionClasses/IndexAction.class.php @@ -604,6 +604,11 @@ class IndexAction extends Action } $this->callSubAction('showlogin'); + } + else + { + $user = Session::getUser(); + $this->addNotice('user',$user->name,'LOGIN_OK',OR_NOTICE_OK,array('name'=>$user->fullname)); } } @@ -620,9 +625,24 @@ class IndexAction extends Action // Aus Sicherheitsgruenden die komplette Session deaktvieren. session_unset(); + if ( @$conf['theme']['compiler']['compile_at_logout']) + { + foreach( $conf['action'] as $actionName => $actionConfig ) + { + foreach( $actionConfig as $subActionName=>$subaction ) + { + if ( is_array($subaction) && !isset($subaction['goto']) && !isset($subaction['direct']) && !isset($subaction['action']) && $subActionName!='menu' ) + { + $engine = new TemplateEngine(); + $engine->compile( strtolower(str_replace('Action','',$actionName)).'/'.$subActionName); + } + } + } + } + // Umleiten auf eine definierte URL.s $redirect_url = @$conf['security']['logout']['redirect_url']; -// Html::debug($redirect_url); + if ( !empty($redirect_url) ) { header('Location: '.$redirect_url); @@ -886,6 +906,7 @@ class IndexAction extends Action $user->setCurrent(); else { + Logger::warn('Guest login failed, user not found: '.$username); $this->addNotice('user',$username,'LOGIN_FAILED',OR_NOTICE_WARN,array('name'=>$username) ); $user = null; }