MOBILE-2795 login: Fix forgot password in 3.3 or older
parent
7ced9ccd5d
commit
2a439224f2
|
@ -203,7 +203,8 @@ export class CoreLoginHelperProvider {
|
|||
return this.requestPasswordReset(siteUrl).then(() => {
|
||||
return true;
|
||||
}).catch((error) => {
|
||||
return error.available == 1 || (error.errorcode != 'invalidrecord' && error.errorcode != '');
|
||||
return error.available == 1 || (typeof error.errorcode != 'undefined' && error.errorcode != 'invalidrecord' &&
|
||||
error.errorcode != '');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -254,14 +254,14 @@ export class CoreWSProvider {
|
|||
if (!data || typeof data != 'object') {
|
||||
return rejectWithError(this.createFakeWSError('core.serverconnection', true));
|
||||
} else if (data.error) {
|
||||
return rejectWithError(data.error);
|
||||
return rejectWithError(data);
|
||||
}
|
||||
|
||||
// Get the first response since only one request was done.
|
||||
data = data[0];
|
||||
|
||||
if (data.error) {
|
||||
return rejectWithError(data.exception);
|
||||
return rejectWithError(data);
|
||||
}
|
||||
|
||||
return data.data;
|
||||
|
|
Loading…
Reference in New Issue