コード例 #1
0
ファイル: Sf.php プロジェクト: bbriggs/web-languageforge
 public function user_updateFromRegistration($validationKey, $params)
 {
     return UserCommands::updateFromRegistration($validationKey, $params, $this->_website);
 }
コード例 #2
0
 public function testUpdateFromRegistration_ExpiredKey_UserNotUpdatedAndKeyConsumed()
 {
     $this->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
     $this->save['userId'] = $userId;
     $userArray = array('id' => '', 'username' => 'joe', 'name' => 'joe user', 'password' => 'password');
     $this->environ->inhibitErrorDisplay();
     $this->expectException();
     UserCommands::updateFromRegistration($key, $userArray, $this->environ->website);
     // nothing runs in the current test function after an exception. IJH 2014-11
 }