From f5513b0fce1d2714829b712b66c13ece27531148 Mon Sep 17 00:00:00 2001 From: Murhaf Sousli Date: Mon, 24 Jul 2017 14:21:42 +0300 Subject: [PATCH] Remove autologin after registeration success --- src/auth/effects/auth.effects.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/auth/effects/auth.effects.ts b/src/auth/effects/auth.effects.ts index f9aa42e..3db20f3 100644 --- a/src/auth/effects/auth.effects.ts +++ b/src/auth/effects/auth.effects.ts @@ -74,9 +74,15 @@ export class AuthEffects { @Effect({dispatch: false}) registerSuccess$ = this.actions$ .ofType(Auth.REGISTER_SUCCESS) - .map((action: Auth.Register) => action.payload) - .map((form: RegisterForm) => {username: form.email, password: form.password}) - .map((cred: Authenticate) => new Auth.Login(cred)); + .do(() => { + + const alert = this.alerts.create({ + title: 'Success', + message: 'Your account request will be reviewed by the admin.', + buttons: ['OK'] + }); + alert.present(); + }); /** Login/Register Fail */