From: wolfgang Date: Wed, 5 Sep 2007 14:56:14 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1167 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1e5816e941a8699fc0acdab320a1e87d6d86c5e;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1167 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index d542f488..c36be425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-05 Wolfgang Sourdeau + + * UI/SOGoUI/UIxComponent.m ([UIxComponent + -shortUserNameForDisplay]): simplified method. + ([-user]): removed method since [context activeUser] is as useful. + 2007-09-04 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]): diff --git a/UI/SOGoUI/UIxComponent.h b/UI/SOGoUI/UIxComponent.h index ff599684..4435c730 100644 --- a/UI/SOGoUI/UIxComponent.h +++ b/UI/SOGoUI/UIxComponent.h @@ -75,7 +75,6 @@ - (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName; /* SoUser */ -- (SoUser *)user; - (NSString *)shortUserNameForDisplay; /* labels */ diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 0e8e45cd..83eb9b18 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -418,35 +418,9 @@ static BOOL uixDebugEnabled = NO; /* SoUser */ -- (SoUser *) user -{ - WOContext *ctx; - - ctx = context; - - return [[[self clientObject] authenticatorInContext: ctx] userInContext: ctx]; -} - - (NSString *) shortUserNameForDisplay { - // TODO: better use a SoUser formatter? - // TODO: who calls that? - NSString *s; - NSRange r; - - // TODO: USE USER MANAGER INSTEAD! - - s = [[self user] login]; - if ([s length] < 10) - return s; - - // TODO: algorithm might be inappropriate, depends on the actual UID - - r = [s rangeOfString:@"."]; - if (r.length == 0) - return s; - - return [s substringToIndex:r.location]; + return [[context activeUser] login]; } /* labels */