Line: 390 to 390 | ||||||||
---|---|---|---|---|---|---|---|---|
getCanonicalUserID( $user ) -> $cUID | ||||||||
Added: | ||||||||
> > |
| |||||||
Return the cUID of the specified user. A cUID is a unique identifier which is assigned by TWiki for each user. BEWARE: While the default TWikiUserMapping uses a cUID that looks like a user's LoginName, some characters are modified to make them compatible with rcs. | ||||||||
Changed: | ||||||||
< < | Additionally, other usermappings will use other conventions - the JoomlauserMapping | |||||||
> > | Other usermappings may use other conventions - the JoomlaUserMapping | |||||||
for example, has cUIDs like 'JoomlaeUserMapping_1234'. | ||||||||
Changed: | ||||||||
< < | If $user is undefined Get the cUID of logged in user, and will generally be 'BaseUserMapping_666' | |||||||
> > | If $user is undefined, it assumes the currently logged-in user. | |||||||
Changed: | ||||||||
< < |
$cUID an internal unique and transportable escaped identifier for
registered users (they can be autogenerated for an authenticated but unregistered
user) | |||||||
> > | Return: $cUID , an internal unique and portable escaped identifier for
registered users. This may be autogenerated for an authenticated but
unregistered user. | |||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Line: 433 to 431 | ||||||||
Since: TWiki::Plugins::VERSION 1.000 (7 Dec 2002) | ||||||||
Changed: | ||||||||
< < | wikiToUserName( $wikiName ) -> $loginNameTranslate a Wiki name (or login name or cUID, if it can) to a login name.
| |||||||
> > | wikiToUserName( $id ) -> $loginNameTranslate a Wiki name to a login name.
| |||||||
Return: $loginName Login name of user, e.g. 'jdoe' , or undef if not
matched. | ||||||||
Line: 450 to 452 | ||||||||
userToWikiName( $loginName, $dontAddWeb ) -> $wikiNameTranslate a login name to a Wiki name | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
$wikiName Wiki name of user, e.g. 'Main.JohnDoe' or 'JohnDoe' | ||||||||
Changed: | ||||||||
< < | userToWikiName will always return a name, if the user does not | |||||||
> > | userToWikiName will always return a name. If the user does not | |||||||
exist in the mapping, the $loginName parameter is returned. (backward compatibility) Since: TWiki::Plugins::VERSION 1.000 (7 Dec 2002) | ||||||||
Line: 470 to 474 | ||||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Changed: | ||||||||
< < | wikiNameToEmails( $wikiname ) -> @emails
| |||||||
> > | @em | |||||||
undef, returns the registered email addresses for the logged-in user. | ||||||||
Added: | ||||||||
> > | Since TWiki 4.2.1, $user may also be a login name, or the name of a group. | |||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Line: 485 to 491 | ||||||||
Since: TWiki::Plugins::VERSION 1.000 (7 Dec 2002) | ||||||||
Changed: | ||||||||
< < | isAnAdmin( $login ) -> $boolean | |||||||
> > | isAnAdmin( $id ) -> $boolean | |||||||
Find out if the user is an admin or not. If the user is not given, the currently logged-in user is assumed. | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Changed: | ||||||||
< < | isGroupMember( $group, $login ) -> $boolean | |||||||
> > | isGroupMember( $group, $id ) -> $boolean | |||||||
Changed: | ||||||||
< < | Find out if $login is in the named group. e.g. | |||||||
> > | Find out if $id is in the named group. e.g. | |||||||
if( TWiki::Func::isGroupMember( "HesperionXXGroup", "jordi" )) { ... | ||||||||
Line: 504 to 510 | ||||||||
If $user is undef , it defaults to the currently logged-in user. | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Line: 527 to 533 | ||||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Changed: | ||||||||
< < | eachMembership($wikiname) -> $iterator | |||||||
> > | eachMembership($id) -> $iterator
| |||||||
Get an iterator over the names of all groups that the user is a member of. | ||||||||
Deleted: | ||||||||
< < | If $wikiname is undef , defaults to the currently logged-in user. | |||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Line: 574 to 581 | ||||||||
Since: TWiki::Plugins::VERSION 1.2 | ||||||||
Changed: | ||||||||
< < | checkAccessPermission( $type, $wikiName, $text, $topic, $web, $meta ) -> $boolean | |||||||
> > | checkAccessPermission( $type, $id, $text, $topic, $web, $meta ) -> $boolean | |||||||
Check access permission for a topic based on the
TWiki.TWikiAccessControl rules
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 598 to 606 | ||||||||
Settings in $meta override Set settings in $text.
A perl true result indicates that access is permitted. | ||||||||
Changed: | ||||||||
< < | Note the wierd parameter order is due to compatibility constraints with | |||||||
> > | Note the weird parameter order is due to compatibility constraints with | |||||||
earlier TWiki releases. Tip if you want, you can use this method to check your own access control types. For example, if you: | ||||||||
Line: 708 to 716 | ||||||||
my $iterator = TWiki::Func::eachChangeSince( $web, time() - 7 * 24 * 60 * 60); # the last 7 days | ||||||||
Changed: | ||||||||
< < | while ($it->hasNext()) { my $change = $it->next(); | |||||||
> > | while ($iterator->hasNext()) { my $change = $iterator->next(); | |||||||
# $change is a perl hash that contains the following fields: # topic => topic name # user => wikiname - wikiname of user who made the change | ||||||||
Line: 779 to 787 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 789 to 797 | ||||||||
my( $meta, $text ) = TWiki::Func::readTopic( $web, $topic ) $text =~ s/APPLE/ORANGE/g; | ||||||||
Changed: | ||||||||
< < | TWiki::Func::saveTopic( $web, $topic, $meta, $text, { comment => 'refruited' } ); | |||||||
> > | TWiki::Func::saveTopic( $web, $topic, $meta, $text, { forcenewrevision => 1 } ); | |||||||
Note: Plugins handlers ( e.g. beforeSaveHandler ) will be called as | ||||||||
Line: 903 to 911 | ||||||||
fully documented in the source code documentation shipped with the
release, or can be inspected in the lib/TWiki/Meta.pm file. | ||||||||
Changed: | ||||||||
< < | This method ignores topic access permissions. You should be careful to use checkAccessPermissions to ensure the current user has read access to the topic. | |||||||
> > | This method ignores topic access permissions. You should be careful to use
checkAccessPermissions to ensure the current user has read access to the
topic. | |||||||
Since: TWiki::Plugins::VERSION 1.000 (7 Dec 2002) | ||||||||
Line: 1209 to 1219 | ||||||||
wikiToEmail( $wikiName ) -> $email | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Get the e-mail address(es) of the named user. If the user has multiple e-mail addresses (for example, the user is a group), then the list will be comma-separated. Since: TWiki::Plugins::VERSION 1.1 | ||||||||
Added: | ||||||||
> > | Deprecated in favour of wikinameToEmails, because this function only returns a single email address, where a user may in fact have several. Since TWiki 4.2.1, $wikiName may also be a login name. | |||||||
Creating New Topics |