+2007-09-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * UI/SOGoUI/UIxComponent.m ([UIxComponent
+ -shortUserNameForDisplay]): simplified method.
+ ([-user]): removed method since [context activeUser] is as useful.
+
2007-09-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]):
/* 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 */