diff options
Diffstat (limited to 'entities/identity/identity_user.go')
-rw-r--r-- | entities/identity/identity_user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/entities/identity/identity_user.go b/entities/identity/identity_user.go index 7eb374d4..f9e39bb2 100644 --- a/entities/identity/identity_user.go +++ b/entities/identity/identity_user.go @@ -15,6 +15,10 @@ func SetUserIdentity(repo repository.RepoConfig, identity *Identity) error { return repo.LocalConfig().StoreString(identityConfigKey, identity.Id().String()) } +func ClearUserIdentity(repo repository.RepoConfig) error { + return repo.LocalConfig().RemoveAll(identityConfigKey) +} + // GetUserIdentity read the current user identity, set with a git config entry func GetUserIdentity(repo repository.Repo) (*Identity, error) { id, err := GetUserIdentityId(repo) |