Package TWiki::UI::Register
User registration handling.
register
command handler.
This method is designed to be
invoked via the
TWiki::UI::run
method.
passwd
command handler.
This method is designed to be
invoked via the
TWiki::UI::run
method.
Called by
ManageCgiScript? ::bulkRegister (requires authentication) with topic = the page with the entries on it.
- Makes sure you are an admin user
- Calls TWiki::Data::DelimitedFile (delimiter => '|', content =>textReadFromTopic)
- ensures requiredFieldsPresent()
- starts a log file
- calls registerSingleBulkUser() for each row
- writes output to log file, sets TWiki.TOPICPARENT? back to page with entries on it.
- redirects to log file
StaticMethod registerAndNext ($session,$tempUserDir)
This is called when action = register or action = ""
It calls register and either Verify or Finish.
Hopefully we will get workflow integrated and rewrite this to be table driven
This is called through:
TWikiRegistration ->
RegisterCgiScript? -> here
- gets rows and fields from the query
- calls _validateRegistration() to ensure required fields correct, else OopsException?
StaticMethod resetPassword ($session)
Generates a password. Mails it to them and asks them to change it. Entry
point intended to be called from TWiki::UI::run
StaticMethod changePassword ($session)
Change the user's password and/or email. Details of the user and password
are passed in CGI parameters.
- Checks required fields have values
- get wikiName and userName from getUserByEitherLoginOrWikiName(username)
- check passwords match each other, and that the password is correct, otherwise 'wrongpassword'
- TWiki::User::updateUserPassword
- 'oopschangepasswd'
The
NoPasswdUser? case is not handled.
An admin user can change other user's passwords.
StaticMethod verifyEmailAddress ($session,$tempUserDir)
This is called: on receipt of the activation password ->
RegisterCgiScript? -> here
- calls _reloadUserContext(activation password)
- throws oops if appropriate
- calls emailRegistrationConfirmations
- still calls 'oopssendmailerr' if a problem, but this is not done uniformly
Presently this is called in
RegisterCgiScript? directly after a call to verify. The separation is intended for the
RegistrationApprovals functionality
- calls _reloadUserContext (throws oops if appropriate)
- calls createUserTopic()
- if using the htpasswdFormatFamily, calls _addUserToPasswordSystem
- calls the misnamed RegistrationHandler? to set cookies
- calls addUserToMapping
- writes the logEntry (if wanted :/)
- redirects browser to 'oopsregthanks'
reloads the context by code
these two are separate in here to ease the implementation of administrator approval