Merge pull request #11078 from ChesterSng/11602-display-message-when-social-auth-acc-uses-password

Fixes #11062 Display information message when social authentication account uses password to login
This commit is contained in:
Matteo Pagliazzi
2019-03-23 18:36:12 +01:00
committed by GitHub
5 changed files with 47 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import { requester } from './requester';
import {
getDocument as getDocumentFromMongo,
updateDocument as updateDocumentInMongo,
unsetDocument as unsetDocumentInMongo,
} from '../mongo';
import {
assign,
@@ -29,6 +30,18 @@ class ApiObject {
return this;
}
async unset (options) {
if (isEmpty(options)) {
return;
}
await unsetDocumentInMongo(this._docType, this, options);
_updateLocalParameters((this, options));
return this;
}
async sync () {
let updatedDoc = await getDocumentFromMongo(this._docType, this);