MOBILE-2915 login: Fix signup errors not displayed
parent
63cfc0604a
commit
ba27f75324
|
@ -261,25 +261,25 @@ export class CoreLoginEmailSignupPage {
|
||||||
(fieldsData) => {
|
(fieldsData) => {
|
||||||
params.customprofilefields = fieldsData;
|
params.customprofilefields = fieldsData;
|
||||||
|
|
||||||
this.wsProvider.callAjax('auth_email_signup_user', params, { siteUrl: this.siteUrl }).then((result) => {
|
return this.wsProvider.callAjax('auth_email_signup_user', params, { siteUrl: this.siteUrl });
|
||||||
if (result.success) {
|
}).then((result) => {
|
||||||
// Show alert and ho back.
|
if (result.success) {
|
||||||
const message = this.translate.instant('core.login.emailconfirmsent', { $a: params.email });
|
// Show alert and ho back.
|
||||||
this.domUtils.showAlert(this.translate.instant('core.success'), message);
|
const message = this.translate.instant('core.login.emailconfirmsent', { $a: params.email });
|
||||||
this.navCtrl.pop();
|
this.domUtils.showAlert(this.translate.instant('core.success'), message);
|
||||||
} else {
|
this.navCtrl.pop();
|
||||||
if (result.warnings && result.warnings.length) {
|
} else {
|
||||||
let error = result.warnings[0].message;
|
if (result.warnings && result.warnings.length) {
|
||||||
if (error == 'incorrect-captcha-sol') {
|
let error = result.warnings[0].message;
|
||||||
error = this.translate.instant('core.login.recaptchaincorrect');
|
if (error == 'incorrect-captcha-sol') {
|
||||||
}
|
error = this.translate.instant('core.login.recaptchaincorrect');
|
||||||
|
|
||||||
this.domUtils.showErrorModal(error);
|
|
||||||
} else {
|
|
||||||
this.domUtils.showErrorModal('core.login.usernotaddederror', true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.domUtils.showErrorModal(error);
|
||||||
|
} else {
|
||||||
|
this.domUtils.showErrorModal('core.login.usernotaddederror', true);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.domUtils.showErrorModalDefault(error, 'core.login.usernotaddederror', true);
|
this.domUtils.showErrorModalDefault(error, 'core.login.usernotaddederror', true);
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|
Loading…
Reference in New Issue