openrat-cms

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

UserSwitchAction.class.php (469B)


      1 <?php
      2 namespace cms\action\user;
      3 use cms\action\Method;
      4 use cms\action\UserAction;
      5 use language\Messages;
      6 use util\Request;
      7 use util\Session;
      8 
      9 
     10 class UserSwitchAction extends UserAction implements Method {
     11     public function view() {
     12 		$this->setTemplateVar('username',$this->user->getName() );
     13     }
     14     public function post() {
     15 		$this->addNoticeFor( $this->user,Messages::USER_LOGIN );
     16 
     17 		// Und in der Sitzung speichern.
     18 		Request::setUser( $this->user );
     19     }
     20 }