%META:TOPICINFO{author="ProjectContributor" date="1760954167" format="1.1" version="1"}%
---+ %MAKETEXT{"Change E-mail Address"}%
Change registered email address
%IF{
  "context passwords_modifyable"
  then="$percentINCLUDE{\"%TOPIC%\" section=\"secretEmailEnabled\"}$percent"
  else="$percentINCLUDE{\"%TOPIC%\" section=\"secretEmailNotEnabled\"}$percent"
}%

<!--
<verbatim class="foswikiHidden">
%STARTSECTION{"secretEmailEnabled"}%
<strong>%MAKETEXT{"This form is used to change your registered e-mail addresses. Your registered addresses are used by Foswiki for sending you e-mails, including notifications of password changes. The addresses you register via this form are kept secret and will *not* be published anywhere on this site."}%</strong>

<div class="foswikiHelp">%X% *%MAKETEXT{"Note:"}%* %MAKETEXT{"If Foswiki can't find a registered e-mail for you in the secret database, you will be unable to reset your password or take advantage of email notifications of topic changes."}%
%MAKETEXT{"If your old e-mail addresses are all invalid (you can't receive mail there any more) and you have forgotten your password, please contact [_1] for help." args="%WIKIWEBMASTER%"}%
</div>

%MAKETEXT{"The e-mail address in your user topic is typically left blank. If you want to reveal an e-mail address to other users, you can manually edit your user topic to add an address.  It does not have to be the same as the address used internally by Foswiki."}%

%IF{"$USERNAME ingroup 'AdminGroup'" then="
%MAKETEXT{"*Administrators:* You can change user's e-mail address using this form. Enter the users [[[_1]][username]] or [[[_1]][WikiName]] and the new e-mail address." args="%SYSTEMWEB%.UserName, %SYSTEMWEB%.WikiName"}%
"}%

<form name="manage" action="%SCRIPTURLPATH{"manage"}%/%WEB%/%TOPIC%" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
*%MAKETEXT{"After submitting this form your e-mail will be changed, and you will be returned to this form."}%*
</div>
<div class="foswikiFormStep">
%MAKETEXT{"Registered e-mail addresses for currently logged in user"}% (=%USERINFO{format="$wikiname"}%=): %USERINFO{format="$emails"}% 
</div>
<div class="foswikiFormStep">
| | %MAKETEXT{"Fields marked [_1] are required" args="=<span class='foswikiAlert'>*</span>="}% |
|  %IF{"$USERNAME ingroup 'AdminGroup'" then="%MAKETEXT{"[[[_1]][username]]:" args="%SYSTEMWEB%.UserName"}%" else="%MAKETEXT{"Your [[[_1]][username]]:" args="%SYSTEMWEB%.UserName"}%"}% | <input type="text" name="username" value="%URLPARAM{"username" default="%USERNAME%"}%" size="40" class="foswikiInputField" /> =<span class="foswikiAlert">*</span>= |%IF{"$USERNAME ingroup 'AdminGroup'" else="
|  %MAKETEXT{"Password:"}% | <input %NOTMODIFYABLE% type=\"password\" name=\"oldpassword\" value=\"%URLPARAM{oldpassword}%\" size=\"40\" class=\"foswikiInputField\" /> =<span class=\"foswikiAlert\">*</span>= |"}%
|  %MAKETEXT{"New e-mails (space-separated list):"}% | <input type="text" name="email" size="40" class="foswikiInputField" /> =<span class="foswikiAlert">*</span>= |
</div>
<div class="foswikiFormStep foswikiLast">
<input type="hidden" name="TopicName" value="%TOPIC%" />
<input type="hidden" name="action" value="changePassword" />
<input type="submit" class="foswikiSubmit" value="%MAKETEXT{"Change e-mail address"}%" />
</div><!-- /foswikiFormStep-->
</div><!-- /foswikiFormSteps-->
</form>

%ENDSECTION{"secretEmailEnabled"}%


%STARTSECTION{"secretEmailNotEnabled"}%
%MAKETEXT{"Your registered e-mails are used by Foswiki for sending you e-mails, include notifications of password changes."}%

%MAKETEXT{"You change your email address by setting the form field called Email in your user topic. If this form field does not exist it will look for a line like this:"}%

=&nbsp;&nbsp;&nbsp;* Set Email = <nop>user@example.com=

%MAKETEXT{"If your old e-mail addresses are all invalid (you can't receive mail there any more) and you have forgotten your password, please contact [_1] for help." args="%WIKIWEBMASTER%"}%

%ENDSECTION{"secretEmailNotEnabled"}%
</verbatim>
-->

<div class="foswikiHelp">
   * %ICON{info}% %MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
   * %ICON{info}% %MAKETEXT{"[_1] has a list of other Foswiki users" args="%USERSWEB%.%WIKIUSERSTOPIC%"}%
</div>

---
*%MAKETEXT{"Related topics:"}%* ChangePassword, ResetPassword, UserToolsCategory, AdminToolsCategory

%META:PREFERENCE{name="ALLOWTOPICVIEW" title="ALLOWTOPICVIEW" type="Set" value="*"}%
%META:PREFERENCE{name="DENYTOPICVIEW" title="DENYTOPICVIEW" type="Set" value="WikiGuest"}%
%META:PREFERENCE{name="PERMSET_VIEW" title="PERMSET_VIEW" type="Local" value="registeredusers"}%
