---+ Package =TWiki::Users=
Singleton object that handles mapping of users to wikinames and
vice versa, and user authentication checking.


%TOC%

---++ ClassMethod *new* <tt>($session,$impl)</tt>
Construct the user management object



---++ ObjectMethod *findUser* <tt>($name[,$wikiname][,$nocreate]) -> $userObject</tt>

	* =$name= - login name or wiki name
	* =$wikiname= - optional, wikiname for created user
	* =$nocreate= - optional, disable creation of user object for user not found in TWikiUsers

Find the user object corresponding to =$name=, which may be either a
login name or a wiki name. The name is looked up in the
TWikiUsers topic. If =$name= is found (either in the list
of login names or the list of wiki names) the corresponding
user object is returned. In this case =$wikiname= is ignored.

If they are not found, and =$nocreate= is true, then return undef.

If =$nocreate= is false, then a user object is returned even if
the user is not listed in TWikiUsers.

If =$nocreate= is false, and no =$wikiname= is given, then the
=$name= is used for both login name and wiki name.



---++ ObjectMethod *addUserToTWikiUsersTopic* <tt>($user) -> $topicName</tt>

Add a user to the TWikiUsers topic. This is a topic that
maps from usernames to wikinames. It is maintained by
Register.pm, or manually outside TWiki.



---++ ObjectMethod *initializeRemoteUser* <tt>($remoteUser) -> $loginName</tt>

Return value: $remoteUser

Acts as a filter for $remoteUser.  If set, $remoteUser is filtered for
insecure characters and untainted.

If not user is passed, the remote user defaults to $cfg{DefaultUserLogin}
(usually 'guest').

If we got here via an authentication status failure, then the remote user
is set to blank, effectively signalling an illegal access.

If no remote user name was passed in, the user defaults to
$cfg{DefaultUserLogin}.


<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the Dev topic instead. -->
