contributions/usermanagement/behaviour/commands/base/confirmpasswordusers.cmd.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Confirm assword change of user 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Usermanagement 00007 */ 00008 class ConfirmPasswordUsersBaseCommand extends CommandChain { 00009 /** 00010 * Execute this command 00011 */ 00012 protected function do_execute() { 00013 $ret = new Status(); 00014 $user = $this->get_instance(); 00015 $pwd = $this->get_params(); 00016 00017 $params = array( 00018 'emailstatus' => Users::EMAIL_STATUS_CONFIRMED, 00019 'emailconfirmationdate' => time() 00020 ); 00021 if ($pwd) { 00022 $params['password'] = $pwd; 00023 } 00024 00025 // Chain next commands 00026 Load::commands('generics/update'); 00027 $this->append(new UpdateCommand($user, $params)); 00028 00029 return $ret; 00030 } 00031 }