Files
munki/code/MunkiStatus/SystemConfigurationInterface.m
Greg Neagle 0e5c04e001 Updated MunkiStatus.xcodeproj
git-svn-id: http://munki.googlecode.com/svn/trunk@47 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-11 17:56:59 +00:00

31 lines
616 B
Objective-C

//
// SystemConfigurationInterface.m
// MunkiStatus
//
// Created by Greg Neagle on 4/23/09.
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import "SystemConfigurationInterface.h"
@implementation NSApplication (ASKAMultiLanguage)
- (NSString *)consoleUser
{
CFStringRef cfuser = NULL;
NSString *username;
cfuser = SCDynamicStoreCopyConsoleUser( NULL, NULL, NULL );
if ( cfuser != NULL ) {
username = [ ( NSString * )cfuser retain ];
CFRelease( cfuser );
} else {
username = @"";
}
return username;
}
@end