• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5186: TWikiFuncDotPm isGuest function does not work

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine TWikiFuncDotPm Normal No Action Required   minor 4.2.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


-- TWiki:Main/AndrewTutolmin - 01 Jan 2008

I've noticed the following error in the TWikiFuncDotPm. isGuest doesn't work properly.

Func.pm has a string

return $TWiki::Plugins::SESSION->{user}->isDefaultUser();

but User.pm contains this code

sub isDefaultUser { # email must be empty string }

I guess the return value of the isGuess will always be undef.

I suggest the following code:

if( TWiki::Func::getDefaultUserName( ) eq TWiki::Func::wikiToUserName(TWiki::Func::getWikiName( ))) { return 1 } 

This code has been completely rewritten for 4.2.0, so this problem is probably specific to 4.1.2.


correct, TWiki::Func::isGuest() now compares the current users cUID with that of the DefaultUser.

-- SvenDowideit - 07 Jan 2008

Summary TWikiFuncDotPm isGuest function does not work
ReportedBy TWiki:Main.AndrewTutolmin
Codebase 4.1.2
SVN Range TWiki-4.3.0, Sun, 30 Dec 2007, build 16120
AppliesTo Engine
Component TWikiFuncDotPm
Priority Normal
CurrentState No Action Required


TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2008-01-07 - SvenDowideit
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback