diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-19 18:31:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 18:31:35 -0500 |
commit | ac74066f0e4f3d62f2d4645c3fa34b88c13958d1 (patch) | |
tree | 9e1cb80eae1b4a2e9dcc2272744c4a9db1b4b804 /cmd/platform/user.go | |
parent | 7e4ff6adcccc4cc5a8fb8cfa853417ec52bf78f4 (diff) | |
download | chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.gz chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.bz2 chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.zip |
remove einterface gets (#7455)
Diffstat (limited to 'cmd/platform/user.go')
-rw-r--r-- | cmd/platform/user.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/platform/user.go b/cmd/platform/user.go index a5a16049e..695e53173 100644 --- a/cmd/platform/user.go +++ b/cmd/platform/user.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/mattermost/mattermost-server/app" - "github.com/mattermost/mattermost-server/einterfaces" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" "github.com/spf13/cobra" @@ -320,7 +319,7 @@ func resetUserPasswordCmdF(cmd *cobra.Command, args []string) error { } func resetUserMfaCmdF(cmd *cobra.Command, args []string) error { - _, err := initDBCommandContextCobra(cmd) + a, err := initDBCommandContextCobra(cmd) if err != nil { return err } @@ -336,7 +335,7 @@ func resetUserMfaCmdF(cmd *cobra.Command, args []string) error { return errors.New("Unable to find user '" + args[i] + "'") } - if err := app.DeactivateMfa(user.Id); err != nil { + if err := a.DeactivateMfa(user.Id); err != nil { return err } } @@ -420,7 +419,7 @@ func deleteAllUsersCommandF(cmd *cobra.Command, args []string) error { } func migrateAuthCmdF(cmd *cobra.Command, args []string) error { - _, err := initDBCommandContextCobra(cmd) + a, err := initDBCommandContextCobra(cmd) if err != nil { return err } @@ -452,7 +451,7 @@ func migrateAuthCmdF(cmd *cobra.Command, args []string) error { forceFlag, _ := cmd.Flags().GetBool("force") - if migrate := einterfaces.GetAccountMigrationInterface(); migrate != nil { + if migrate := a.AccountMigration; migrate != nil { if err := migrate.MigrateToLdap(fromAuth, matchField, forceFlag); err != nil { return errors.New("Error while migrating users: " + err.Error()) } |