contributions/usermanagement/behaviour/commands/base/restartsessionusers.cmd.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Restart session before logign in user - created salted session id 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Usermanagement 00007 */ 00008 class RestartsessionUsersBaseCommand extends CommandChain { 00009 /** 00010 * Returns title of command. 00011 */ 00012 public function get_name() { 00013 return 'restartsession'; 00014 } 00015 00016 /** 00017 * Execute this command 00018 */ 00019 protected function do_execute() { 00020 $ret = new Status(); 00021 /* @var $user DAOUsers */ 00022 $user = $this->get_instance(); 00023 $salt = $user->creationdate . $user->email . $user->id . $user->password . $user->modificationdate; 00024 $sess_id = Common::create_token($salt); 00025 Session::restart($sess_id); 00026 return $ret; 00027 } 00028 }