Package TWiki::Users::BaseUserMapping
User mapping is the process by which TWiki maps from a username (a login name)
to a display name and back. It is also where groups are maintained.
The BaseMapper provides support for a small number of predefined users.
No registration - this is a read only usermapper. It uses the mapper
prefix 'BaseUserMapping_'.
Users
- TWikiAdmin - uses the password that was set in Configure (IF its not null)
- TWikiGuest
- UnknownUser
- TWikiContributor - 1 Jan 2005
- TWikiRegistrationAgent - 1 Jan 2005
Groups
- $TWiki::cfg{SuperAdminGroup}
- TWikiBaseGroup
On this page:
- ClassMethod new ($session)
- ObjectMethod finish ()
- ObjectMethod loginTemplateName () -> templateFile
- ObjectMethod handlesUser ($cUID,$login,$wikiname) -> $boolean
- ObjectMethod login2cUID ($login) -> $cUID
- ObjectMethod getLoginName ($cUID) -> login
- ObjectMethod getWikiName ($cUID) -> wikiname
- ObjectMethod userExists ($user) -> $boolean
- ObjectMethod eachUser () -> listIteratorofcUIDs
- ObjectMethod eachGroupMember ($group) -> listIteratorofcUIDs
- ObjectMethod isGroup ($name) -> boolean
- ObjectMethod eachGroup () -> ListIteratorofgroupnames
- ObjectMethod eachMembership ($cUID) -> ListIteratorofgroupsthisuserisin
- ObjectMethod isAdmin ($cUID) -> $boolean
- ObjectMethod getEmails ($name) -> @emailAddress
- ObjectMethod getUserData ($cUID) -> $dataRef
- ObjectMethod findUserByWikiName ($wikiname) -> listofcUIDsassociatedwiththatwikiname
- ObjectMethod checkPassword ($login,$passwordU) -> $boolean
- ObjectMethod setPassword ($cUID,$newPassU,$oldPassU) -> $boolean
- ObjectMethod passwordError () -> $string
ClassMethod new ($session)
Construct the BaseUserMapping objectObjectMethod finish ()
Break circular references.ObjectMethod loginTemplateName () -> templateFile
allows UserMappings to come with customised login screens - that should preffereably only over-ride the UI functionObjectMethod handlesUser ($cUID,$login,$wikiname) -> $boolean
See baseclass for documentation. In the BaseUserMapping case, we know all the details of the users we specialise in.ObjectMethod login2cUID ($login) -> $cUID
Convert a login name to the corresponding canonical user name. The canonical name can be any string of 7-bit alphanumeric and underscore characters, and must correspond 1:1 to the login name. (undef on failure)ObjectMethod getLoginName ($cUID) -> login
converts an internal cUID to that user's login (undef on failure)ObjectMethod getWikiName ($cUID) -> wikiname
Map a canonical user name to a wikinameObjectMethod userExists ($user) -> $boolean
Determine if the user already exists or not.ObjectMethod eachUser () -> listIteratorofcUIDs
See baseclass for documentation.ObjectMethod eachGroupMember ($group) -> listIteratorofcUIDs
See baseclass for documentation. The basemapper implementation assumes that there are no nested groups in the basemapper.ObjectMethod isGroup ($name) -> boolean
See baseclass for documentation.ObjectMethod eachGroup () -> ListIteratorofgroupnames
See baseclass for documentation.ObjectMethod eachMembership ($cUID) -> ListIteratorofgroupsthisuserisin
See baseclass for documentation.ObjectMethod isAdmin ($cUID) -> $boolean
True if the user is an admin- is a member of the $TWiki::cfg{SuperAdminGroup}
ObjectMethod getEmails ($name) -> @emailAddress
If $name is a cUID, return their email addresses. If it is a group,
return the addresses of everyone in the group.
ObjectMethod getUserData ($cUID) -> $dataRef
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 as40
-
{note}
- comment note, if any