Register users on your Foswiki site; change/reset/install passwords; remove user accounts
JaneSmith
to JaneMiller
. %M% Jane Smith is now known as JaneMiller
* JaneSmith - jsmith - 13 Sep 2006
* JaneMiller - jmiller - 13 Sep 2006
Security and Authentication
tab, Registration
sub-tab. {Register}{EnableNewUserRegistration}
(This is the default)
{Register}{NeedVerification}
{Register}{NeedApproval}
{Register}{Approvers}
{Register}{UniqueEmail}
to prevent use of the same email by multiple users.
By default, any email domain can be used for registration. Set the expert setting {Register}{EmailFilter}
to restrict the domains usable for registration. See the configure help for more details.
See the configure help at configure Security and Authentication
tab, Registration
sub-tab, for more details.
{Register}{ExpireAfter}
to a negative number, which will mean that Foswiki won't try to clean up expired registrations durning registration. Instead you
should use a cron job to clean up expired sessions. The standard maintenance cron script tools/tick_foswiki.pl
includes this function.
Note that if you are using registration approval by 3rd party reviewers, this timer should most likely be significantly increased. 24 hours = 86400, 3 days = 259200.
Pending registration requests are stored in the{WorkingDir}/registration_approvals
directory, but are no longer in plain text format. To view the pending registrations see the new PendingRegistrations report.
Note that while it may be interesing to enable fields like OrganizationURL, Comments, etc. they are often used by registration SPAM-Bots to generate topics with links.
If you want to modify the contents of the user page that is created during user registration.
The Registration process will automatically find and use the Main version of the template if it exists.
If you want to customize the contents of the UserForm, for example, to remove or add field:By combining all the above concepts, it's possible to have multiple categories of users, for example "Customers", "Vendors", "Employees", each with a custom Template topic, a custom User form and a custom Registration form.
Multiple categories of users can be supported by:User registration confirmation. (Awaiting email verification). | templates/registerconfirm.tmpl |
User registration failed notification, cleanup was successful. | templates/registerfailedremoved.tmpl |
User registration failed notification, cleanup of partial registration also failed. | templates/registerfailednotremoved.tmpl |
User registration denied notification. | templates/registerdenied.tmpl |
Approver registration pending notification. | templates/registerapprove.tmpl |
User notification of sucessful registraiton. | templates/registernotify.tmpl |
Administrator notification of successful registration. | templates/registernotifyadmin.tmpl |
.tmpl
files in the templates
dir, this cannot use Template topics.
Note: As of Foswiki 2.1.3, the email From:
address can be different from the WIKIWEBMASTER address, and is configurable using the bin/configure
tool.
See the "Expert" {WikiAgentName}
and {WikiAgentEmail}
settings on the "Mail" section, "Basic Settings and Autoconfiguration" tab.
If these fields are not set, then the WIKIWEBMASTER setting will be used as the From:
address.
These template files have a specific format that matches the raw format of emails sent via SMTP, so be careful and test your changes. It is easiest to start by copying the default templates that you wish to change.: (You don't need to copy every template).
cd templates cp registernotify.tmpl registernotify.myskin.tmpl cp registerconfirm.tmpl registerconfirm.myskin.tmpl cp registernotifyadmin.tmpl registernotifyadmin.myskin.tmplthen add
myskin
to the beginning of the SKIN
setting in SitePreferences.
From this point on, your myskin templates will be used for the registration emails.
To make it possible for users to modify the email contents, you could use a parameterized%INCLUDE%
statement in your customized version, eg:
From: %WIKIAGENTNAME% <%WIKIAGENTEMAIL%> To: %FIRSTLASTNAME% <%EMAILADDRESS%> Subject: %MAKETEXT{ "[_1] - Registration for [_2] ([_3])" args="%WIKITOOLNAME%, %WIKINAME%, %EMAILADDRESS%" }% Auto-Submitted: auto-generated MIME-Version: 1.0 Content-Type: text/plain; charset=%CHARSET% Content-Transfer-Encoding: 8bit %INCLUDE{ "%USERSWEB%.RegisterNotifyEmail" WIKINAME="%WIKINAME%" FIRSTLASTNAME="%FIRSTLASTNAME%" EMAILADDRESS="%EMAILADDRESS%" TEMPLATETOPIC="%TEMPLATETOPIC%" }%
Welcome to %WIKITOOLNAME%. %MAKETEXT{"Your personal [_1] topic is located at [_2]. You can customize it as you like:" args="%WIKITOOLNAME%, %SCRIPTURL{"view"}%/%USERSWEB%/%WIKINAME%"}% * %MAKETEXT{"Some people turn it into a personal portal with favorite links, what they work on, what help they'd like, etc."}% * %MAKETEXT{"Some add schedule information and vacation notice."}% Regards %WIKIWEBMASTERNAME% Your Wiki Admin %MAKETEXT{"Note:"}% 2 %MAKETEXT{"You can change your password at via [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ChangePassword"}% 3 %MAKETEXT{"If you haven't set a password yet or you want to reset it, go to: [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ResetPassword"}% %MAKETEXT{"Submitted content:"}% %FORMDATA%