<dl>
<dt></dt>
<dd>
- <ul class="buttonList smallButtons">
- <li><a class="button small" href="{link controller='EmailActivation'}{/link}"><span>{lang}wcf.user.emailActivation{/lang}</span></a></li>
- </ul>
<small>{lang newEmail=$__wcf->user->email}wcf.user.changeEmail.needReactivation{/lang}</small>
+ <small><a href="{link controller='EmailActivation'}{/link}"><span>{lang}wcf.user.emailActivation{/lang}</span></a></small>
</dd>
</dl>
{/if}
public function save() {
parent::save();
+ $data = [
+ 'email' => $this->user->newEmail,
+ 'newEmail' => '',
+ 'reactivationCode' => 0
+ ];
+ if ($this->user->activationCode != 0 && REGISTER_ACTIVATION_METHOD == 1) {
+ $data['activationCode'] = 0;
+ }
+
// enable new email
$this->objectAction = new UserAction([$this->user], 'update', [
- 'data' => array_merge($this->additionalFields, [
- 'email' => $this->user->newEmail,
- 'newEmail' => '',
- 'reactivationCode' => 0
- ])
+ 'data' => array_merge($this->additionalFields, $data)
]);
$this->objectAction->executeAction();
$this->saved();