mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 02:45:25 +00:00
Monotone-Parent: ec985fb9e6b66a8966484429823a42e99822facc
Monotone-Revision: 9710a1d0cb659a58b931bdacad52d1d28dbbbe47 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-05T14:55:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user