Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

FEATURE: log out user #397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Classes/UserVoice.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,12 @@ + (NSString *)version {
return @"3.2.3";
}

+ (void)logoutUser{
[[UVSession currentSession] clear];
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
[prefs setObject:@"" forKey:@"uv-user-email"];
[prefs setObject:@"" forKey:@"uv-user-name"];
[prefs synchronize];
}

@end
3 changes: 3 additions & 0 deletions Include/UserVoice.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
// Get the current version number of the iOS SDK
+ (NSString *)version;

// Log out user and clear stored name and email
+ (void)logoutUser;

// For integration with other services
+ (void)setExternalId:(NSString *)identifier forScope:(NSString *)scope;

Expand Down