buildrelease
[openafs-wiki.git] / TWiki / TWikiUIRegisterDotPm.mdwn
1 # <a name="Package &lt;code&gt;TWiki::UI::Register="></a> Package =TWiki::UI::Register
2
3 User registration handling.
4
5 <div>
6   <ul>
7     <li><a href="#Package =TWiki::UI::Register="> Package TWiki::UI::Register</a><ul>
8         <li><a href="#StaticMethod <strong>register_cgi</strong> ($se"> StaticMethod register_cgi <tt>($session)</tt></a></li>
9         <li><a href="#StaticMethod <strong>bulkRegister</strong> ($se"> StaticMethod bulkRegister <tt>($session)</tt></a></li>
10         <li><a href="#StaticMethod *register_AndNext*"> StaticMethod registerAndNext <tt>($session)</tt></a></li>
11         <li><a href="#StaticMethod <strong>register</strong> ($sessio"> StaticMethod register <tt>($session)</tt></a></li>
12         <li><a href="#StaticMethod <strong>resetPassword</strong> ($s"> StaticMethod resetPassword <tt>($session)</tt></a></li>
13         <li><a href="#StaticMethod <strong>changePassword</strong> ($"> StaticMethod changePassword <tt>($session)</tt></a></li>
14         <li><a href="#StaticMethod *verify_EmailAddres"> StaticMethod verifyEmailAddress <tt>($session)</tt></a></li>
15       </ul>
16     </li>
17   </ul>
18 </div>
19
20 ## <a name="StaticMethod &lt;strong&gt;register_cgi&lt;/strong&gt; ($se"></a> [[StaticMethod]] **register\_cgi** `($session)`
21
22 `register` command handler. This method is designed to be invoked via the `UI::run` method.
23
24 ## <a name="StaticMethod &lt;strong&gt;bulkRegister&lt;/strong&gt; ($se"></a> [[StaticMethod]] **bulkRegister** `($session)`
25
26 Called by [[ManageCgiScript]]::bulkRegister (requires authentication) with topic = the page with the entries on it.
27
28 ## <a name="StaticMethod &lt;strong&gt;register_AndNext*"></a><a name="StaticMethod *register_AndNext&lt;/strong&gt; "></a> [[StaticMethod]] **registerAndNext** `($session)`
29
30 This is called when action = register or action = ""
31
32 It calls register and either Verify or Finish.
33
34 Hopefully we will get workflow integrated and rewrite this to be table driven
35
36 ## <a name="StaticMethod &lt;strong&gt;register&lt;/strong&gt; ($sessio"></a> [[StaticMethod]] **register** `($session)`
37
38 This is called through: [[TWikiRegistration]] -&gt; [[RegisterCgiScript]] -&gt; here
39
40 ## <a name="StaticMethod &lt;strong&gt;resetPassword&lt;/strong&gt; ($s"></a> [[StaticMethod]] **resetPassword** `($session)`
41
42 Generates a password. Mails it to them and asks them to change it. Entry point intended to be called from UI::run
43
44 ## <a name="StaticMethod &lt;strong&gt;changePassword&lt;/strong&gt; ($"></a> [[StaticMethod]] **changePassword** `($session)`
45
46 Change the user's password and/or email. Details of the user and password are passed in CGI parameters.
47
48 1. Checks required fields have values
49 2. get wikiName and userName from getUserByEitherLoginOrWikiName(username)
50 3. check passwords match each other, and that the password is correct, otherwise 'wrongpassword'
51 4. TWiki::User::updateUserPassword
52 5. 'oopschangepasswd'
53
54 The [[NoPasswdUser]] case is not handled.
55
56 An admin user can change other user's passwords.
57
58 ## <a name="StaticMethod &lt;strong&gt;verify_EmailAddres"></a> [[StaticMethod]] \*verifyEmailAddress `($session)`
59
60 This is called: on receipt of the activation password -&gt; [[RegisterCgiScript]] -&gt; here
61
62 1. calls \_loadPendingRegistration(activation password)
63 2. throws oops if appropriate
64 3. calls emailRegistrationConfirmations
65 4. still calls 'oopssendmailerr' if a problem, but this is not done uniformly