contributions/usermanagement/behaviour/commands/permanentlogins/end.cmd.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * End a permanent login 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Usermanagement 00007 */ 00008 class EndPermanentloginsCommand extends CommandComposite { 00009 /** 00010 * Does executing 00011 */ 00012 protected function do_execute() { 00013 $ret = new Status(); 00014 Load::commands('generics/cookie.delete'); 00015 00016 $login = PermanentLogins::get_current(); 00017 if ($login) { 00018 $this->append(CommandsFactory::create_command($login, 'delete', false)); 00019 } 00020 // remove cookie 00021 $this->append(new CookieDeleteCommand(PermanentLogins::COOKIE_NAME)); 00022 00023 return $ret; 00024 } 00025 }