public function user_updateFromRegistration($validationKey, $params)
 {
     return UserCommands::updateFromRegistration($validationKey, $params, $this->website);
 }
 /**
  * @expectedException Exception
  */
 public function testUpdateFromRegistration_ExpiredKey_UserNotUpdatedAndKeyConsumed()
 {
     self::$environ->clean();
     $user = new UserModel();
     $user->emailPending = '*****@*****.**';
     $key = $user->setValidation(1);
     $date = $user->validationExpirationDate;
     $date->sub(new DateInterval('P2D'));
     $user->validationExpirationDate = $date;
     $userId = $user->write();
     // save data for rest of this test
     self::$save['userId'] = $userId;
     $userArray = array('id' => '', 'username' => 'joe', 'name' => 'joe user', 'password' => 'password');
     self::$environ->inhibitErrorDisplay();
     UserCommands::updateFromRegistration($key, $userArray, self::$environ->website);
     // nothing runs in the current test function after an exception. IJH 2014-11
 }