data/TWiki/TWikiUIRegisterDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
---+ Package =TWiki::UI::Register=
colas@0
     2
colas@0
     3
User registration handling.
colas@0
     4
colas@0
     5
colas@0
     6
%TOC%
colas@0
     7
colas@0
     8
---++ StaticMethod *register_cgi* <tt>($session)</tt>
colas@0
     9
colas@0
    10
=register= command handler.
colas@0
    11
This method is designed to be
colas@0
    12
invoked via the =UI::run= method.
colas@0
    13
colas@0
    14
colas@0
    15
colas@0
    16
---++ StaticMethod *bulkRegister* <tt>($session)</tt>
colas@0
    17
colas@0
    18
  Called by ManageCgiScript::bulkRegister (requires authentication) with topic = the page with the entries on it.
colas@0
    19
colas@0
    20
colas@0
    21
colas@0
    22
---++ StaticMethod *registerAndNext* <tt>($session)</tt>
colas@0
    23
colas@0
    24
This is called when action = register or action = ""
colas@0
    25
colas@0
    26
It calls register and either Verify or Finish.
colas@0
    27
colas@0
    28
Hopefully we will get workflow integrated and rewrite this to be table driven
colas@0
    29
colas@0
    30
colas@0
    31
colas@0
    32
---++ StaticMethod *register* <tt>($session)</tt>
colas@0
    33
colas@0
    34
This is called through: TWikiRegistration -> RegisterCgiScript -> here
colas@0
    35
colas@0
    36
colas@0
    37
colas@0
    38
---++ StaticMethod *resetPassword* <tt>($session)</tt>
colas@0
    39
colas@0
    40
Generates a password. Mails it to them and asks them to change it. Entry
colas@0
    41
point intended to be called from UI::run
colas@0
    42
colas@0
    43
colas@0
    44
colas@0
    45
---++ StaticMethod *changePassword* <tt>($session)</tt>
colas@0
    46
colas@0
    47
Change the user's password and/or email. Details of the user and password
colas@0
    48
are passed in CGI parameters.
colas@0
    49
colas@0
    50
   1 Checks required fields have values
colas@0
    51
   2 get wikiName and userName from getUserByEitherLoginOrWikiName(username)
colas@0
    52
   3 check passwords match each other, and that the password is correct, otherwise 'wrongpassword'
colas@0
    53
   4 TWiki::User::updateUserPassword
colas@0
    54
   5 'oopschangepasswd'
colas@0
    55
colas@0
    56
The NoPasswdUser case is not handled.
colas@0
    57
colas@0
    58
An admin user can change other user's passwords.
colas@0
    59
colas@0
    60
colas@0
    61
colas@0
    62
---++ StaticMethod *verifyEmailAddress* <tt>($session)</tt>
colas@0
    63
colas@0
    64
This is called: on receipt of the activation password -> RegisterCgiScript -> here
colas@0
    65
   1 calls _loadPendingRegistration(activation password)
colas@0
    66
   2 throws oops if appropriate
colas@0
    67
   3 calls emailRegistrationConfirmations
colas@0
    68
   4 still calls 'oopssendmailerr' if a problem, but this is not done uniformly
colas@0
    69
colas@0
    70