data/TWiki/TWikiUIRegisterDotPm.txt,v
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.5;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.5
       
     9 date	2008.01.22.03.21.35;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	1.4;
       
    12 
       
    13 1.4
       
    14 date	2007.01.16.04.11.58;	author TWikiContributor;	state Exp;
       
    15 branches;
       
    16 next	1.3;
       
    17 
       
    18 1.3
       
    19 date	2006.06.25.16.26.33;	author TWikiContributor;	state Exp;
       
    20 branches;
       
    21 next	1.2;
       
    22 
       
    23 1.2
       
    24 date	2006.04.01.05.55.43;	author TWikiContributor;	state Exp;
       
    25 branches;
       
    26 next	1.1;
       
    27 
       
    28 1.1
       
    29 date	2006.02.01.12.01.26;	author TWikiContributor;	state Exp;
       
    30 branches;
       
    31 next	;
       
    32 
       
    33 
       
    34 desc
       
    35 @new-topic
       
    36 @
       
    37 
       
    38 
       
    39 1.5
       
    40 log
       
    41 @buildrelease
       
    42 @
       
    43 text
       
    44 @---+ Package =TWiki::UI::Register=
       
    45 
       
    46 User registration handling.
       
    47 
       
    48 
       
    49 %TOC%
       
    50 
       
    51 ---++ StaticMethod *register_cgi* <tt>($session)</tt>
       
    52 
       
    53 =register= command handler.
       
    54 This method is designed to be
       
    55 invoked via the =UI::run= method.
       
    56 
       
    57 
       
    58 
       
    59 ---++ StaticMethod *bulkRegister* <tt>($session)</tt>
       
    60 
       
    61   Called by ManageCgiScript::bulkRegister (requires authentication) with topic = the page with the entries on it.
       
    62 
       
    63 
       
    64 
       
    65 ---++ StaticMethod *registerAndNext* <tt>($session)</tt>
       
    66 
       
    67 This is called when action = register or action = ""
       
    68 
       
    69 It calls register and either Verify or Finish.
       
    70 
       
    71 Hopefully we will get workflow integrated and rewrite this to be table driven
       
    72 
       
    73 
       
    74 
       
    75 ---++ StaticMethod *register* <tt>($session)</tt>
       
    76 
       
    77 This is called through: TWikiRegistration -> RegisterCgiScript -> here
       
    78 
       
    79 
       
    80 
       
    81 ---++ StaticMethod *resetPassword* <tt>($session)</tt>
       
    82 
       
    83 Generates a password. Mails it to them and asks them to change it. Entry
       
    84 point intended to be called from UI::run
       
    85 
       
    86 
       
    87 
       
    88 ---++ StaticMethod *changePassword* <tt>($session)</tt>
       
    89 
       
    90 Change the user's password and/or email. Details of the user and password
       
    91 are passed in CGI parameters.
       
    92 
       
    93    1 Checks required fields have values
       
    94    2 get wikiName and userName from getUserByEitherLoginOrWikiName(username)
       
    95    3 check passwords match each other, and that the password is correct, otherwise 'wrongpassword'
       
    96    4 TWiki::User::updateUserPassword
       
    97    5 'oopschangepasswd'
       
    98 
       
    99 The NoPasswdUser case is not handled.
       
   100 
       
   101 An admin user can change other user's passwords.
       
   102 
       
   103 
       
   104 
       
   105 ---++ StaticMethod *verifyEmailAddress* <tt>($session)</tt>
       
   106 
       
   107 This is called: on receipt of the activation password -> RegisterCgiScript -> here
       
   108    1 calls _loadPendingRegistration(activation password)
       
   109    2 throws oops if appropriate
       
   110    3 calls emailRegistrationConfirmations
       
   111    4 still calls 'oopssendmailerr' if a problem, but this is not done uniformly
       
   112 
       
   113 
       
   114 @
       
   115 
       
   116 
       
   117 1.4
       
   118 log
       
   119 @buildrelease
       
   120 @
       
   121 text
       
   122 @d12 1
       
   123 a12 9
       
   124 invoked via the =TWiki::UI::run= method.
       
   125 
       
   126 
       
   127 
       
   128 ---++ StaticMethod *passwd_cgi* <tt>($session)</tt>
       
   129 
       
   130 =passwd= command handler.
       
   131 This method is designed to be
       
   132 invoked via the =TWiki::UI::run= method.
       
   133 a18 7
       
   134    1 Makes sure you are an admin user ;)
       
   135    2 Calls TWiki::Data::DelimitedFile (delimiter => '|', content =>textReadFromTopic)
       
   136    3 ensures requiredFieldsPresent()
       
   137    4 starts a log file
       
   138    5 calls registerSingleBulkUser() for each row 
       
   139    6 writes output to log file, sets [[TWiki.TOPICPARENT]] back to page with entries on it.
       
   140    7 redirects to log file
       
   141 d22 1
       
   142 a22 1
       
   143 ---++ StaticMethod *registerAndNext* <tt>($session,$tempUserDir)</tt>
       
   144 a35 3
       
   145    1 gets rows and fields from the query
       
   146    2 calls _validateRegistration() to ensure required fields correct, else OopsException 
       
   147 
       
   148 d41 1
       
   149 a41 1
       
   150 point intended to be called from TWiki::UI::run
       
   151 d62 1
       
   152 a62 1
       
   153 ---++ StaticMethod *verifyEmailAddress* <tt>($session,$tempUserDir)</tt>
       
   154 d65 1
       
   155 a65 1
       
   156    1 calls _reloadUserContext(activation password)
       
   157 a70 16
       
   158 
       
   159 ---++ StaticMethod *finish* <tt></tt>
       
   160 
       
   161 Presently this is called in RegisterCgiScript directly after a call to verify. The separation is intended for the RegistrationApprovals functionality
       
   162    1 calls _reloadUserContext (throws oops if appropriate)
       
   163    3 calls createUserTopic()
       
   164    4 if using the htpasswdFormatFamily, calls _addUserToPasswordSystem
       
   165    5 calls the misnamed RegistrationHandler to set cookies
       
   166    6 calls addUserToMapping
       
   167    7 writes the logEntry (if wanted :/)
       
   168    8 redirects browser to 'oopsregthanks'
       
   169 
       
   170 reloads the context by code
       
   171 these two are separate in here to ease the implementation of administrator approval 
       
   172 
       
   173 
       
   174 @
       
   175 
       
   176 
       
   177 1.3
       
   178 log
       
   179 @buildrelease
       
   180 @
       
   181 text
       
   182 @d9 1
       
   183 d17 1
       
   184 @
       
   185 
       
   186 
       
   187 1.2
       
   188 log
       
   189 @buildrelease
       
   190 @
       
   191 text
       
   192 @d92 1
       
   193 a92 1
       
   194    3 calls newUserFromTemplate()
       
   195 d95 1
       
   196 a95 1
       
   197    6 calls addUserToTWikiUsersTopic
       
   198 @
       
   199 
       
   200 
       
   201 1.1
       
   202 log
       
   203 @buildrelease
       
   204 @
       
   205 text
       
   206 @d72 3
       
   207 a74 1
       
   208 The NoPasswdUser case is not handled
       
   209 a102 5
       
   210 
       
   211  generate user entry
       
   212  If a password exists (either in Data{PasswordA} or data{CryptPassword}, use it.
       
   213  Otherwise generate a random one, and store it back in the user record.
       
   214 
       
   215 @