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 Base Mapper? provides support for a small number of predefined users.
No registration - this is a read only usermapper. It uses the mapper
prefix 'BaseUserMapping_'.
Users
- TWiki Admin? - uses the password that was set in Configure (IF its not null)
- TWiki Guest?
- Unknown User?
- TWiki Contributor - 1 Jan 2005
- TWiki Registration Agent? - 1 Jan 2005
Groups
- $TWiki::cfg{SuperAdminGroup}
- TWiki Base Group?
On this page:
- Users
- 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 findUserByWikiName ($wikiname) -> listofcUIDsassociatedwiththatwikiname
- ObjectMethod checkPassword ($login,$passwordU) -> $boolean
- ObjectMethod setPassword ($cUID,$newPassU,$oldPassU) -> $boolean
- ObjectMethod passwordError () -> $string
Class Method new ($session)
Construct the Base User Mapping? objectObject Method finish ()
Break circular references.Object Method loginTemplateName () -> templateFile
allows User Mappings? to come with customised login screens - that should preffereably only over-ride the UI functionObject Method handlesUser ($cUID,$login,$wikiname) -> $boolean
See baseclass for documentation. In the Base User Mapping? case, we know all the details of the users we specialise in.Object Method 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)Object Method getLoginName ($cUID) -> login
converts an internal cUID to that user's login (undef on failure)Object Method getWikiName ($cUID) -> wikiname
Map a canonical user name to a wikinameObject Method userExists ($user) -> $boolean
Determine if the user already exists or not.Object Method eachUser () -> listIteratorofcUIDs
See baseclass for documentation.Object Method eachGroupMember ($group) -> listIteratorofcUIDs
See baseclass for documentation. The basemapper implementation assumes that there are no nested groups in the basemapper.Object Method isGroup ($name) -> boolean
See baseclass for documentation.Object Method eachGroup () -> List Iteratorofgroupnames?
See baseclass for documentation.Object Method eachMembership ($cUID) -> List Iteratorofgroupsthisuserisin?
See baseclass for documentation.Object Method isAdmin ($cUID) -> $boolean
True if the user is an admin- is a member of the $TWiki::cfg{SuperAdminGroup}
Object Method 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.Object Method findUserByWikiName ($wikiname) -> listofcUIDsassociatedwiththatwikiname
See baseclass for documentation.Object Method checkPassword ($login,$passwordU) -> $boolean
Finds if the password is valid for the given user. Returns 1 on success, undef on failure.Object Method setPassword ($cUID,$newPassU,$oldPassU) -> $boolean
If the $oldPassU matches matches the user's password, then it will replace it with $newPassU. If $oldPassU is not correct and not 1, will return 0. If $oldPassU is 1, will force the change irrespective of the existing password, adding the user if necessary. Otherwise returns 1 on success, undef on failure.Object Method passwordError () -> $string
returns a string indicating the error that happened in the password handlers TODO: these delayed error's should be replaced with Exceptions. returns undef if no error| Topic TWikiUsersBaseUserMappingDotPm . { Edit | Attach | Backlinks: Web All webs | Printable | History: r1 More } |