|
@@ -60,6 +60,8 @@ class ExternalAccount {
|
|
|
else {
|
|
else {
|
|
|
debug(`ExternalAccount '${accountId}' is not found, it is going to be registered.`);
|
|
debug(`ExternalAccount '${accountId}' is not found, it is going to be registered.`);
|
|
|
|
|
|
|
|
|
|
+ // TODO count and throw error if username is dupricated
|
|
|
|
|
+
|
|
|
return createUserFunction().then((user) => {
|
|
return createUserFunction().then((user) => {
|
|
|
return this.create({ providerType: 'ldap', accountId, user: user._id });
|
|
return this.create({ providerType: 'ldap', accountId, user: user._id });
|
|
|
});
|
|
});
|