• 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.

Item6531: loginname shown instead of wikiname

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine LdapContrib Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When I login with Ldap, WIKINAME returns the loginname instead of the wikiname. This could be reletad to Item6464, Item6362, Item4920. I looked at the problem and the following fixed it for me:
diff -rupN lib_orig/TWiki/Users.pm lib/TWiki/Users.pm
--- lib_orig/TWiki/Users.pm   2010-07-23 06:21:26.000000000 -0700
+++ lib/TWiki/Users.pm   2010-07-23 06:23:05.000000000 -0700
@@ -280,7 +280,9 @@ sub initialiseUser {
             $cUID = mapLogin2cUID($login);
 
             $this->{cUID2Login}->{$cUID} = $login;
-            $this->{cUID2WikiName}->{$cUID}  = $login;
+            my $mapping = $this->_getMapping($cUID);
+            my $wikiname = $mapping->getWikiName($cUID) if $mapping;
+            $this->{cUID2WikiName}->{$cUID}  = $wikiname || $login;
 
             # needs to be WikiName safe
             $this->{cUID2WikiName}->{$cUID} =~ s/$TWiki::cfg{NameFilter}//go;

It seems that a cache is filled with the loginname instead of the wikiname and later only the cache is used instead of the getWikiName() from the LdapContrib.

-- TWiki:Main/ErhardSiegl - 2010-07-26

Thank you Erhard for the report and proposed fix. Is this on TWiki-5.0.0 as reported? FYI, we have tested 100 extensions for TWiki 5.0 compatibility, the LdapContrib is pending testing.

What {UserMappingManager} do you use with {PasswordManager} set to TWiki::Users::LdapUser? With LdapUser I usually use the TWiki::Users::TWikiUserMapping for user mapping.

-- TWiki:Main.PeterThoeny - 2010-07-26

Yes, it is 5.0.0.

$TWiki::cfg{UserMappingManager} = 'TWiki::Users::LdapUserMapping';
$TWiki::cfg{PasswordManager} = 'TWiki::Users::LdapUser';

With this settings I see the LDAP-Groups in TWikiGroups, but not the Users in TWikiUsers, but If this is intended, its ok. I'm quite satisfied how the LDAP-integration works with the proposed patch.

-- TWiki:Main.ErhardSiegl - 2010-08-02

FYI, I had the same problem, and Erhard's fix worked for me as well, on a fresh install of TWiki 5.0.1.

-- TWiki:Main.JohnWorsley - 2010-11-01

FYI -- I have the same problem, but with

$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping'; TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';

but the fix doesn't help. moving from 4.1.2 to 5.0.0.

-- TWiki:Main.TomMathieu - 2010-11-05

ItemTemplate
Summary loginname shown instead of wikiname
ReportedBy TWiki:Main.ErhardSiegl
Codebase 5.0.0
SVN Range TWiki-5.0.0, Tue, 06 Jul 2010, build 19208
AppliesTo Engine
Component LdapContrib
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-11-05 - TomMathieu
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback