/ Published in: C
Expand |
Embed | Plain Text
- (BOOL) isActiveUser { NSDictionary *sessionInfo = (NSDictionary *) CGSessionCopyCurrentDictionary(); NSString *shortUserName = [sessionInfo valueForKey:kCGSessionUserNameKey]; NSString *userUID = [sessionInfo valueForKey:kCGSessionUserIDKey]; BOOL userIsActive = [[sessionInfo valueForKey:kCGSessionOnConsoleKey] boolValue]; NSString *loginCompleted = [sessionInfo valueForKey:kCGSessionLoginDoneKey]; NSLog(@"Session information: %@", sessionInfo); return userIsActive; }
You need to login to post a comment.
