From ac74066f0e4f3d62f2d4645c3fa34b88c13958d1 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 19 Sep 2017 18:31:35 -0500 Subject: remove einterface gets (#7455) --- cmd/platform/user.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cmd/platform/user.go') 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()) } -- cgit v1.2.3-1-g7c22