create new tag
, view all tags

Feature Proposal: User Data Management API and GUI


Currently there is no standard way to display and manage user data. The HtPasswdUser password manager has its own forms to change/reset passwords and e-mails. The OpenIdRpContrib has its own forms to manipulate user data (Ian Kluft spent a lot of time implementing the GUI alone). The LdapContrib has no GUI to manage user data.

The goal of this feature is to define a standard where user data can be managed centrally with a GUI.

This feature was already proposed and accepted at SetFlagtoChangePassword; it is externalized here as a separate proposal because it is a significant new feature of TWiki that raises the bar on usability.

Description and Documentation

Password managers can declare their own data (fields with name, value, type, note) so that TWiki's user manager can show queries and forms to display and manipulate user data in a transparent way. It is a data driven design that can easily be extended.

There are two new pages for admins:

  • User Query Page for Admins -- to find a user to manage
  • Manage User Account Page for Admins -- to change the account data of a user

User Query Page for Admins

The QueryUsers page is used by members of the TWikiAdminGroup to find a user for account maintenance. This is a non-functional mock-up:

Find users:   show all   clear

Manage User Profile Page E-mail MCP LPC Disabled
Edit topic edit AmirShobeiri amir@examplePLEASENOSPAM.com   2 days ago Yes / Done
Edit topic edit ChrisVanDoren chris@examplePLEASENOSPAM.com Yes / Done 3 month ago  
Edit topic edit PeterThoeny peter@examplePLEASENOSPAM.com   2 years ago  
Edit topic edit SopanShewale sopan@examplePLEASENOSPAM.com Yes / Done 2 days ago  
Edit topic edit StefanWalter stefan@examplePLEASENOSPAM.com   12 days ago  
Edit topic edit TWikiAdminUser admin@examplePLEASENOSPAM.com      
Edit topic edit TWikiContributor N/A      
Edit topic edit TWikiGuest N/A      
Edit topic edit TWikiRegistrationAgent N/A      
Edit topic edit UnknownUser N/A      
Edit topic edit VickiBrown vicki@examplePLEASENOSPAM.com  

Total: 12

  • MCP: User must change password
  • LPC: Last password change
  • Disabled: User account is disabled

Manage User Account Page for Admins

The EditUserAccount page is used by members of the TWikiAdminGroup to change user account data that TWiki manages internally. Non-functional mock-up:

WikiName of user:   find users
User Account Data for SopanShewale
User profile page: SopanShewale
Login name: SopanShewale
Separate multiple e-mail addresses by comma or space
Retype password:
Leave password fields empty unless you want to change it
Last password change: 2010-09-29 09:47 GMT (2 days ago)
Disabled accounts cannot login but remain in the system
Green led User account data has been saved


WhatDoesItAffect: API, UI, Usability


The TWiki::Users::Password base class declares these new methods:

TWiki::Users::Password::getUserData( $cUID ) -> $data

Return a reference to an array of hashes with user data, used to manage users. Each item is a hash with:

  • {name} - name of field, such as "email"
  • {title} - title of field, such as "E-mail"
  • {value} - value of field, such as "jimmy@example.com"
  • {type} - type of field: text, password, checkbox, label
  • {size} - size of field, such as 40
  • {note} - comment note, if any

User management forms can be build dynamically from this data structure. Each password manager may return a different set of fields. If a password manager returns only elements of type label, the form is considered read-only, thus will not show a save button.

Sample data record for TWikiAdminUser:

    { name => 'wikiname',
      title => 'User profile page',
      value => 'TWikiAdminUser',
      type => 'label',
      size  => 40,
      note => ''
    { name => 'cuid',
      title => 'Canonical user ID',
      value => 'BaseUserMapping_333',
      type => 'label',
      size  => 40,
      note => ''
    { name => 'login',
      title => 'Login name',
      value => admin,
      type => 'label',
      size  => 40,
      note => ''
    { name => 'emails',
      title => 'E-mail',
      value => 'peter@example.com',
      type => 'label',
      size  => 40,
      note => 'Can be changed in ={WebMasterEmail}= configure setting'
    { name => 'password',
      title => 'Password',
      value => '******',
      type => 'label',
      size  => 40,
      note => 'Can be changed in ={Password}= configure setting'

This is implemented for SVN:core/lib/TWiki/Users/BaseUserMapping.pm and SVN:core/lib/TWiki/Users/HtPasswdUser.pm

TWiki::Users::Password::setUserData( $cUID, $data )

Set the user data of a user. Same array of hashes as getUserData is assumed, although only {name} and {value} are used.

Sub classes should return an empty string if save action is OK, or an error string starting with 'Error: '.

This is implemented for SVN:core/lib/TWiki/Users/BaseUserMapping.pm and SVN:core/lib/TWiki/Users/HtPasswdUser.pm


The TWiki::Users class registeres a new USERMANAGER variable that handles the user query table and the edit user data form:

1. User query table

%USERMANAGER{ action="queryusers" filter="%URLPARAM{ "filter" encode="quote" }%" }%

2. Edit user data form

%USERMANAGER{ action="edituser" user="%URLPARAM{ "user" encode="quote" }%" }%

-- Contributors: PeterThoeny - 2010-10-02


I externalized this proposal from existing SetFlagtoChangePassword proposal.

-- PeterThoeny - 2010-10-02

This feature is now MergedToCore and will be available in TWiki-5.1.

-- PeterThoeny - 2010-10-04

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2010-10-25 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.