contributions/usermanagement/behaviour/commands/base/logout.cmd.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Logout command to be overloaded 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Usermanagement 00007 */ 00008 class LogoutUsersBaseCommand extends CommandComposite { 00009 /** 00010 * Returns title of command. 00011 */ 00012 public function get_name() { 00013 return 'logout'; 00014 } 00015 00016 public function execute() { 00017 $ret = parent::execute(); 00018 if ($ret->is_ok()) { 00019 Load::commands('generics/triggerevent'); 00020 $cmd = new TriggerEventCommand('logout', false); 00021 $cmd->execute(); 00022 } 00023 return $ret; 00024 } 00025 00026 protected function do_execute() { 00027 $ret = new Status(); 00028 00029 Session::clear(); 00030 $cmd = CommandsFactory::create_command('permanentlogins', 'end', false); 00031 $this->append($cmd); 00032 00033 return $ret; 00034 } 00035 }