diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go index c1b40852d..caf573463 100644 --- a/api/user.go +++ b/api/user.go @@ -2336,6 +2336,10 @@ func ActivateMfa(userId, token string) *model.AppError { user = result.Data.(*model.User) } + if len(user.AuthService) > 0 && user.AuthService != model.USER_AUTH_SERVICE_LDAP { + return model.NewLocAppError("ActivateMfa", "api.user.activate_mfa.email_and_ldap_only.app_error", nil, "") + } + if err := mfaInterface.Activate(user, token); err != nil { return err } |