Tags:
create new tag
, view all tags

Question

I wanted to change the fields on the TWikiRegistration, the registration doesn't error but when I view the new users page, but the email and wikiname are not displaying in the UserForm and data is out of order.


This is part of my new registration form:

First Name: **
Last Name: **
(identifies you to others) WikiName: **
Email: **
Your password: **
Retype password: **
KMX: **
Office: **
Comments:
(optional)
Fields marked ** are required
 

This is my Main.UserForm:

User Form

This form defines the form of the home pages of registered TWiki users listed in TWikiUsers.

Name Type Size Values Tooltip message
FirstName text 40    
LastName text 40    
WikiName text 40   Use to login.
Email text 40   Used if you sign up for notifications.
KMX text 40    
Office text 40    
Comment textarea 60x12    


My NewUserTemplate has this at the top:
%SPLIT%
   * %KEY%: %VALUE%%SPLIT%

When I register a new user:

  • The new user gets the email
  • The admin gets the email
  • The user is added to TwikiUsers
  • The user is logged in and a new entry is created in the .htpassword file
    • TestUserT:{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=:ann-elizabeth.brady@SPAM.com
  • The new users page looks like this: (email and wikiname do not display and they are out of order)
  • newuser_example.JPG
  • If I edit the page, I can enter the data in the form and then it works from then on. How do I get the email and wikiname to display in the UserForm?


If I look at the meta data:
  • in the C:\TWiki401\data\Main\TestUserK.txt file you can see that those values are not being saved (they are also the only ones that have attributes="")
  • also noticed that they have <nop> in the title (what does this <nop> thing do? prevent linking right? searching for it in TWiki just brought back lots of pages that use it)
  • (I removed the leading % from the META lines so they would appear)
%META:FORM{name="%25MAINWEB%25.UserForm"}%
%META:FIELD{name="FirstName" title="First Name" value="Test"}%
%META:FIELD{name="LastName" title="Last Name" value="UserJ"}%
%META:FIELD{name="Email" attributes="" title="Email" value=""}%
%META:FIELD{name="Comment" title="Comment" value="test"}%
%META:FIELD{name="WikiName" attributes="" title="WikiName" value=""}%
%META:FIELD{name="Office" title="Office" value="Lowell"}%
%META:FIELD{name="KMX" title="KMX" value="2323232"}%
%META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Local" value="UserView"}%

  • if I edit the user page and re-enter the data, my meta data now looks like this:
%META:FORM{name="%25MAINWEB%25.UserForm"}%
%META:FIELD{name="FirstName" attributes="" title="FirstName" value="Test"}%
%META:FIELD{name="LastName" attributes="" title="LastName" value="UserJ"}%
%META:FIELD{name="Email" attributes="" title="Email" value="ann-elizabeth.brady@kodak.com"}%
%META:FIELD{name="Comment" attributes="" title="Comment" value="test"}%
%META:FIELD{name="WikiName" attributes="" title="WikiName" value="TestUserJK"}%
%META:FIELD{name="Office" attributes="" title="Office" value="Lowell"}%
%META:FIELD{name="KMX" attributes="" title="KMX" value="2323232"}%
%META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Local" value="UserView"}%

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP SP1
Web server: Apache 2.0.55
Perl version: ActivePerl 5.8.7
Client OS: XP SP1
Web Browser: IE\Firefox
Categories: Registration

-- AnnBrady - 23 Mar 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

This is a bit obscure: Each time you change Main.UserForm you need to edit/save the TWiki.NewUserTemplate. This will show the fields in the proper order when you register users.

The WikiName is the user's topic name. It would be redundant to put it in the form. If you want that you could add a field:

| WikiName | text | 40 | %TOPIC% | |

  • yes it is redundant to add the WikiName..what I really want to call it is LoginName (several users have tried logging in with their email address) so I wanted to put it out there and update the email they get to make the login id more obvious (I implemented this suggestion) -- AnnBrady - 23 Mar 2006
  • Not sure, but try %USERNAME% -- PeterThoeny - 23 Mar 2006
    • I changed the Main.UserForm so the default value is %USERNAME%, edit\save the NewUserTemplate, created a new user and looked at the users Wiki page, the value is blank. -- AnnBrady - 23 Mar 2006

-- PeterThoeny - 23 Mar 2006

I had noticed that each time I changed the UserForm that I needed to edit/save the NewUserTemplate. I may have forgotten to do that a few times, so I added a reminder and link to my UserForm. The fields are appearing in the right order when I edit the NewUserTemplate or the users wiki page but not on View.

  • This applies to new registrations. Old registrations need to be edited/saved once. -- PeterThoeny - 23 Mar 2006
  • Not quite so simple...edit (enter data) and save. For user files I had copied over from a Cairo release I updated the format="1.0" to format="1.1" and pasted the Meta data directly into the .txt file because the Add Form button didn't show up on the format="1.0" pages and neither did the form (it did on the format="1.1" pages). I have now manually fixed all my existing users. -- AnnBrady - 23 Mar 2006
  • Make sure that the UserForm is listed in your Main.WebPreferences' WEBFORMS setting. This allows you to edit an existing user page in your browser, add the form, and copy&paste the old data into the form. Time consuming, yes; should be scripted. -- PeterThoeny - 23 Mar 2006
    • I had Set WEBFORMS = UserForm,TWikiPreferencesForm in my Twiki.WebPreferences, this is now included in my Main.WebPreferences as well (just the UserForm). did not notice any difference after I did this. -- AnnBrady - 23 Mar 2006

-- AnnBrady - 23 Mar 2006

Any ideas for why the email address isn't appearing initially? Also, if I change the Email address in the UserForm it doesn't update the Email address in the .htpassword file. I really think these two should be connected. The registration process does put the email address in the .htpassword file (just not in the users twiki page).

-- AnnBrady - 23 Mar 2006

Is anyone else using the TemplateLogin and .htpassword file and could send me a sample of their UserForm, NewUserTemplate and TWikiRegistration?

-- AnnBrady - 24 Mar 2006

This combination should just work out of the box, it does for me. Archive your copies and try the version from the download.

A design decision for TWiki-4 was that the email address of the user should not go on the user's home page. There's probably an assumption in the code that prevents it getting there even if it is included in the NewUserTemplate.

The "Main.UserForm you need to edit/save the NewUserTemplate." is in my view a bug. Please log it on Bugs:WebHome

-- MartinCleaver - 24 Mar 2006

reverted to the TwikiRegistration file that came with the download and this started working, reverted back to mine, and it still worked...weird, unsatsifying, but not touching it anymore...

-- AnnBrady - 27 Mar 2006

 
Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatJPG newuser_example.JPG manage 10.3 K 2006-03-23 - 14:46 AnnBrady  
Topic revision: r12 - 2006-04-07 - SvenDowideit
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.